OFFSET
1,2
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..1000
Kevin Ryde, PARI/GP Code, finding linear recurrence and g.f.
FORMULA
a(n) = X*a(n-s) + Y*a(n-2*s) + a(n-3*s) for n >= 8546, where s = 2848, X = Perrin(f) = A001608(f), Y = -Perrin(-f) = A078712(f), f = 4368. - Kevin Ryde, Oct 12 2024
MAPLE
A000931 := proc(n) option remember: if(n=0)then return 1: elif(n<=2)then return 0: else return procname(n-2)+procname(n-3): fi: end: A117602ind := proc(n) option remember: local k, p: if(n=1)then return 7: fi: for k from procname(n-1)+1 do p:=A000931(k): if(not p=A000931(A117602ind(n-1)) and p mod (((p-1) mod 9) + 1) = 0)then return k: fi: od: end: seq(A000931(A117602ind(n)), n=1..41); # Nathaniel Johnston, May 05 2011
MATHEMATICA
p=LinearRecurrence[{0, 1, 1}, {1, 0, 0}, 71]; Rest[Union[Select[p, Divisible[#, Mod[#-1, 9]+1]&]]] (* James C. McMahon, Sep 25 2024 *)
PROG
(PARI) \\ See links.
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 05 2006
EXTENSIONS
Offset changed from 0 to 1 by Nathaniel Johnston, May 05 2011
STATUS
approved