OFFSET
1,2
COMMENTS
Periodic with period length 8.
REFERENCES
Oskars Rieksts, Email to N. J. A. Sloane, Jun 04 2017
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,1).
FORMULA
From Colin Barker, Jun 04 2017: (Start)
G.f.: x*(1 + 3*x + 7*x^2 + 5*x^3 + 11*x^4 + 23*x^5 + 47*x^6 + 19*x^7 + 12*x^8) / ((1 - x)*(1 + x)*(1 + x^2)*(1 + x^4)).
a(n) = a(n-8) for n>9.
(End)
MAPLE
gpf:= n->max(1, op(numtheory[factorset](n))); # A006530
a:=[1]; i:=1;
for n from 1 to 100 do i:=gpf(2*i+1); a:=[op(a), i]; od:
a;
PROG
(Python)
from sympy import primefactors
l=[0, 1]
for n in range(2, 77):
l.append(primefactors(2*l[n - 1] + 1)[-1])
print(l[1:]) # Indranil Ghosh, Jun 04 2017
(PARI) Vec(x*(1 + 3*x + 7*x^2 + 5*x^3 + 11*x^4 + 23*x^5 + 47*x^6 + 19*x^7 + 12*x^8) / ((1 - x)*(1 + x)*(1 + x^2)*(1 + x^4)) + O(x^100)) \\ Colin Barker, Jun 04 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 04 2017
STATUS
approved