cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A255418 Row 8 of Ludic array A255127.

Original entry on oeis.org

23, 145, 271, 403, 523, 655, 781, 911, 1037, 1157, 1289, 1417, 1543, 1673, 1801, 1927, 2057, 2183, 2305, 2437, 2563, 2693, 2819, 2951, 3071, 3197, 3331, 3457, 3587, 3713, 3841, 3967, 4093, 4223, 4349, 4477, 4603, 4735, 4855, 4987, 5113, 5237, 5369, 5489, 5621, 5747, 5875, 6001
Offset: 1

Views

Author

Antti Karttunen, Feb 22 2015

Keywords

Crossrefs

Row 8 of A255127. See A255417 for row 7 and A255419 for row 9.

Programs

  • PARI
    my(L=vector(3913910, x, 3*x+1+x%2), m(n, k)=2^(n\/k*k)\(2^k-1)); for(i=3, 7, L=vecextract(L, 2^#L-m(#L, L[1])-1)); L255418=vecextract(L, m(#L, L[1]));
    A255418(n, P=92160)=n--\P*11741730 + L255418[n%P+1] \\ M. F. Hasler, Nov 17 2024
    
  • Python
    # S can be decreased if only terms up to a smaller limit are needed.
    def A255418(n, S=11741730, P=92160):
        try: n-=1; return A255418.L[n]
        except IndexError: return A255418.L[n%P] + n//P*S
        except AttributeError: L = [x+5-x%2 for x in range(0, S, 3)]
        while (k:=L[0]) < 23: L = [x for i, x in enumerate(L) if i%k]
        A255418.L = L[::k]; return A255418(n+1) # M. F. Hasler, Nov 17 2024
  • Scheme
    (define (A255418 n) (A255127bi 8 n)) ;; Code for A255127bi given in A255127.
    

Formula

a(n) = a(n-P) + S = a((n-1)%P + 1) + S*floor((n-1)/P) with period P = 92160 = A377469(8) and shift S = 11741730 = A376237(9). - M. F. Hasler, Nov 17 2024