OFFSET
1,2
COMMENTS
This sequence appears to generate many prime numbers.
The first few composite terms in this sequence are 10, 33, 385, 561, 649, ...
Contains all members of A038883 except 13. - Robert Israel, Jun 03 2019
That is, contains all primes which are congruent to +-1, +-3 or +-4 (mod 13). - M. F. Hasler, Feb 16 2022
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
10 is a term because A006190(9) = 12970 is divisible by 10.
MAPLE
M:= <<3, 1>|<1, 0>>:
filter:= proc(n) uses LinearAlgebra[Modular];
local A;
A:= Mod(n, M, integer);
MatrixPower(n, A, n-1)[1, 2]=0
end proc:
filter(1):= true:
select(filter, [$1..659]); # Robert Israel, Jun 03 2019
MATHEMATICA
nn = 660; s = LinearRecurrence[{3, 1}, {0, 1}, nn]; Select[Range@ nn, Divisible[s[[#]], #] &](* Michael De Vlieger, Mar 28 2016, after Harvey P. Dale at A006190 *)
PROG
(PARI) a006190(n) = ([1, 3; 1, 2]^n)[2, 1];
for(n=1, 1e3, if(Mod(a006190(n-1), n) == 0, print1(n, ", ")));
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 28 2016
STATUS
approved