-
Notifications
You must be signed in to change notification settings - Fork 0
/
prog.pl
32 lines (22 loc) · 3.5 KB
/
prog.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/perl
# Integers m such that m and m+1 are terms of A111035.
# https://oeis.org/A331977
# All (odd) terms are squarefree (Daniel Yaqubi and Amirali Fatehizadeh).
# https://arxiv.org/abs/2001.11839
use 5.020;
use experimental qw(signatures);
use ntheory qw(:all);
sub isok($n) {
(lucas_sequence($n, 1, -1, $n + 2))[0] == 1;
}
local $| = 1;
forsquarefree {
if (($_&1) && isok($_) && isok($_ + 1)) {
print($_, ", ");
}
} 6479, 1e10;
__END__
# First 128 terms:
1, 6479, 11663, 34943, 47519, 51983, 196559, 327359, 685583, 954239, 1016063, 1346879, 2039183, 2332799, 2504447, 4665599, 5143823, 5962319, 6128639, 6723359, 7225343, 9363599, 12027023, 12446783, 14930351, 17639999, 17735759, 22924943, 24681023, 34715519, 41990399, 42386399, 50561279, 53406863, 54053999, 56893199, 59748479, 66389903, 68372639, 86239439, 93006479, 96227999, 97120799, 105557759, 107729999, 110859839, 142277471, 146805119, 153679679, 170220239, 172709999, 213490079, 216711359, 233425919, 233722943, 238533119, 250758143, 271595519, 277033679, 302342543, 325730303, 334450943, 341510399, 388634399, 398798399, 430479503, 432972863, 440999999, 468850031, 473457599, 541511999, 549183599, 561121343, 599374079, 616306319, 634430159, 640494863, 671354879, 671872319, 683020799, 753429599, 850751999, 868024079, 900622799, 918590399, 936151919, 1061096399, 1116581759, 1226131199, 1256560703, 1298960207, 1307370239, 1591444799, 1618747199, 1750694399, 1788317999, 1837144319, 1841067359, 1944809999, 2190343679, 2222186399, 2258150399, 2433311999, 2468102399, 2981159999, 3020219999, 3089267999, 3125606399, 3309470783, 3406823423, 3678179903, 3954121919, 3959933183, 4393509119, 4652331263, 4804279199, 4832049599, 5221616399, 5247059999, 5331362399, 5392793999, 5659315199, 6466902623, 6596160479, 6666395903, 6725312063, 6821891999, 7293081599
# If all terms are odd, then the first 148 terms are (based on the b-file by Giovanni Resta from A331976):
1, 6479, 11663, 34943, 47519, 51983, 196559, 327359, 685583, 954239, 1016063, 1346879, 2039183, 2332799, 2504447, 4665599, 5143823, 5962319, 6128639, 6723359, 7225343, 9363599, 12027023, 12446783, 14930351, 17639999, 17735759, 22924943, 24681023, 34715519, 41990399, 42386399, 50561279, 53406863, 54053999, 56893199, 59748479, 66389903, 68372639, 86239439, 93006479, 96227999, 97120799, 105557759, 107729999, 110859839, 142277471, 146805119, 153679679, 170220239, 172709999, 213490079, 216711359, 233425919, 233722943, 238533119, 250758143, 271595519, 277033679, 302342543, 325730303, 334450943, 341510399, 388634399, 398798399, 430479503, 432972863, 440999999, 468850031, 473457599, 541511999, 549183599, 561121343, 599374079, 616306319, 634430159, 640494863, 671354879, 671872319, 683020799, 753429599, 850751999, 868024079, 900622799, 918590399, 936151919, 1061096399, 1116581759, 1226131199, 1256560703, 1298960207, 1307370239, 1591444799, 1618747199, 1750694399, 1788317999, 1837144319, 1841067359, 1944809999, 2190343679, 2222186399, 2258150399, 2433311999, 2468102399, 2981159999, 3020219999, 3089267999, 3125606399, 3309470783, 3406823423, 3678179903, 3954121919, 3959933183, 4393509119, 4652331263, 4804279199, 4832049599, 5221616399, 5247059999, 5331362399, 5392793999, 5659315199, 6466902623, 6596160479, 6666395903, 6725312063, 6821891999, 7293081599, 8219368079, 8227094399, 8282514239, 8348111423, 8568834623, 8615552399, 8850107519, 8916112799, 9226284479, 9527321663, 9569951999, 10109900303, 10279699199, 10468457999, 10809345023, 10849305599, 11273502239, 11486603519, 11726290943, 12724571519