OFFSET
1,1
COMMENTS
The subsequence for q = 3 begins with {30, 60, 66, 70, 90, 102, 120, ...}
The subsequence for q = 4 begins with {390, 690, 780, 1170, 1290, ...}
The subsequence for q = 5 begins with {12090, 24180, 32370, 36270, ...}
The subsequence for q = 6 begins with {1656330, 2405910, 3312660, ...}
The subsequence for q = 7 begins with {1412849490, 1989687570, ...}
Number of terms < 10^k: 0, 5, 103, 1001, 7861, 60088, 476156, 3920881, 33312469, ..., . Robert G. Wilson v, Jan 06 2017
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1002
EXAMPLE
390 is in the sequence because the prime factors are {2, 3, 5, 13} and we have 2 == 5 (mod 3) and 3 == 13 (mod 5).
1656330 is in the sequence because the prime factors are {2, 3, 5, 13, 31, 137} and we have 2 == 5 (mod 3), 3 == 13 (mod 5), 5 == 31 (mod 13) and 13 == 137 mod 31.
MAPLE
with(numtheory):nn:=1000:
for n from 2 to nn do:
lst2:={}:x:=factorset(n):n0:=nops(x):lst1:={}:
for m from 1 to n0-2 do:
lst1:=lst1 union {x[m]}:
if x[m]=irem(x[m+2], x[m+1])
then
lst2:=lst2 union {x[m]}:
else
fi:
od:
if lst2=lst1 and lst2 <> {}
then
printf(`%d, `, n):
else
fi:
od:
MATHEMATICA
fQ[n_] := If[ PrimeNu@ n > 2, Block[{d = First@# & /@ FactorInteger@ n}, Union[ Mod[d[[# + 2]], d[[# + 1]]] == d[[#]] & /@ Range[ Length@ d - 2]] == {True}], False]; Select[Range@550, fQ] (* Robert G. Wilson v, Jan 02 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 02 2017
STATUS
approved