OFFSET
0,3
COMMENTS
For j > 0, a(2j) = 2 and a(j+1) is even.
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 0..1000
EXAMPLE
a(9) = 46 because all previous terms are relatively prime to 9 and the sum of all previous terms is 46.
PROG
(Python)
from math import gcd
def A055935_list(nmax):
A = [1, 1]
for n in range(2, nmax+1):
if n%2 > 1:
A.append(2)
else:
A.append(sum(i for i in A if gcd(n, i) ==1))
return A # John Tyler Rascoe, Jun 12 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Jul 17 2000
STATUS
approved