OFFSET
1,1
COMMENTS
This is the first row in A255127 that starts with a composite number.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10001
FORMULA
a(n) = a(n-P) + S = a((n-1)%P + 1) + S*floor((n-1)/P) with period P = 2027520 = A377469(9) and shift S = 293543250 = A376237(10). - M. F. Hasler, Nov 17 2024
PROG
(PARI) my(L=vector(97847750, x, 3*x+1+x%2), m(n, k)=2^(n\/k*k)\(2^k-1)); for(i=3, 8, L=vecextract(L, 2^#L-m(#L, L[1])-1)); L255419=vecextract(L, m(#L, L[1]));
\\ If only terms up to N < P are needed, the vector L above can be chosen shorter
A255419(n, P=2027520)=n--\P*293543250 + L255419[n%P+1] \\ M. F. Hasler, Nov 17 2024
(Python) # if only terms up to a smaller limit S are needed, then S can be decreased
def A255419(n, S=293543250, P=2027520):
try: n -= 1; return A255419.L[n]
except IndexError: return A255419.L[n%P] + n//P*S
except AttributeError: L = [x+5-x%2 for x in range(0, S, 3)]
while (k:=L[0]) < 25: L = [x for i, x in enumerate(L) if i%k]
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 22 2015
STATUS
approved