OFFSET
1,1
COMMENTS
The preponderance of entries are primes. The first which is not prime is 341.
All composite entries are 2-pseudoprimes. - Charles R Greathouse IV, Nov 04 2016
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MAPLE
A066047 := proc(n)
option remember ;
if n = 1 then
5 ;
else
for a from procname(n-1)+1 do
if modp(A001045(a-1), a) =0 then
return a;
end if;
end do:
end if;
end proc:
seq(A066047(n), n=1..100) ; # R. J. Mathar, May 25 2023
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n] = a[n - 1] + 2a[n - 2]; Select[ Range[500], IntegerQ[a[ # - 1]/# ] && # != 1 & ]
PROG
(PARI) is(n)=Mod(2, 3*n)^(n-1) == 1 \\ Charles R Greathouse IV, Nov 04 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Dec 29 2001
EXTENSIONS
More terms from Robert G. Wilson v, Jan 03 2002
STATUS
approved