login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Row 9 of Ludic array A255127.
4

%I #17 Nov 18 2024 07:37:19

%S 25,167,311,457,599,745,883,1033,1181,1321,1469,1615,1753,1903,2041,

%T 2191,2339,2483,2623,2773,2911,3059,3211,3353,3493,3637,3781,3929,

%U 4067,4217,4367,4507,4657,4795,4937,5087,5227,5377,5527,5665,5813,5957,6101,6241,6389,6535,6683,6821,6971,7111

%N Row 9 of Ludic array A255127.

%C This is the first row in A255127 that starts with a composite number.

%H Antti Karttunen, <a href="/A255419/b255419.txt">Table of n, a(n) for n = 1..10001</a>

%F 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

%o (Scheme) (define (A255419 n) (A255127bi 9 n)) ;; Code for A255127bi given in A255127.

%o (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]));

%o \\ If only terms up to N < P are needed, the vector L above can be chosen shorter

%o A255419(n, P=2027520)=n--\P*293543250 + L255419[n%P+1] \\ _M. F. Hasler_, Nov 17 2024

%o (Python) # if only terms up to a smaller limit S are needed, then S can be decreased

%o def A255419(n, S=293543250, P=2027520):

%o try: n -= 1; return A255419.L[n]

%o except IndexError: return A255419.L[n%P] + n//P*S

%o except AttributeError: L = [x+5-x%2 for x in range(0, S, 3)]

%o while (k:=L[0]) < 25: L = [x for i, x in enumerate(L) if i%k]

%o A255419.L = L[::k]; return A255419(n+1) # _M. F. Hasler_, Nov 17 2024

%Y Row 9 of A255127. See A255413 - A255418 for rows 3 through 8.

%K nonn

%O 1,1

%A _Antti Karttunen_, Feb 22 2015