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.

A249341 Positions of ones in A249337; positions of zeros in A249072.

Original entry on oeis.org

1, 3, 7, 14, 21, 40, 46, 71, 81, 98, 122, 146, 194, 241, 258, 297, 323, 380, 401, 433, 482, 491, 533, 567, 633, 716, 761, 767, 808, 836, 879, 1068, 1105, 1210, 1216, 1370, 1415, 1469, 1515, 1541, 1606, 1684, 1707, 1854, 1872, 1906, 1936, 2117, 2277, 2294, 2305, 2344
Offset: 1

Views

Author

Antti Karttunen, Oct 26 2014

Keywords

Crossrefs

After the initial term, one more than A249342.

Programs

  • PARI
    allocatemem(234567890);
    A049084(n) = if(isprime(n), primepi(n), 0); \\ This function from Charles R Greathouse IV
    A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * A049084(f[i,1]))); }
    A249341_write_bfile(up_to_n) = { my(counts, n, k, a_k); counts = vector(min((2^24)-8,up_to_n^2)); n = 0; k = 0; a_k = 1; while(n < up_to_n, k++; if((1 == a_k), n++; write("b249341.txt", n, " ", k)); counts[1+A056239(a_k)]++; if(1 == k, a_k = 2, a_k = counts[1+A056239(a_k)])); };
    A249341_write_bfile(10000);
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library, two alternative definitions.
    (define A249341 (MATCHING-POS 1 1 (lambda (n) (= 1 (A249337 n)))))
    (define A249341 (ZERO-POS 1 1 A249072))

Formula

For all n >= 2: a(n) = A249342(n) + 1.