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.

Showing 1-3 of 3 results.

A249337 a(1) = 1, a(2) = 2; for n>2, a(n) = number of values k in range 1 .. n-1 such that {sum of prime indices in the prime factorization of a(k)} = {sum of prime indices in the prime factorization of a(n-1)}, both counted with multiplicity.

Original entry on oeis.org

1, 2, 1, 2, 2, 3, 1, 3, 2, 4, 3, 4, 5, 1, 4, 6, 2, 5, 3, 7, 1, 5, 4, 8, 5, 6, 7, 2, 6, 8, 9, 3, 9, 4, 10, 5, 10, 6, 11, 1, 6, 12, 7, 8, 13, 1, 7, 9, 10, 11, 2, 7, 12, 13, 2, 8, 14, 3, 11, 4, 12, 14, 5, 15, 6, 16, 15, 7, 16, 17, 1, 8, 17, 2, 9, 18, 8, 18, 9, 19, 1, 9, 20, 10, 21, 3, 13, 4, 14, 11, 12, 22, 5, 19, 2, 10, 23, 1
Offset: 1

Views

Author

Antti Karttunen, Oct 25 2014

Keywords

Crossrefs

Cf. A056239, A249072 (sum of prime indices of n-th term), A249341 (positions of ones), A249342 (positions of the first occurrences of each noncomposite).
Cf. also A249336 (a similar sequence with a slightly different starting condition), A249148.

Programs

  • PARI
    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]))); }
    A249337_write_bfile(up_to_n) = { my(counts, n, a_n); counts = vector(up_to_n); a_n = 1; for(n = 1, up_to_n, write("b249337.txt", n, " ", a_n); counts[1+A056239(a_n)]++; if(1 == n, a_n = 2, a_n = counts[1+A056239(a_n)])); };
    A249337_write_bfile(12580);
    
  • Scheme
    ;; With memoization-macro definec from Antti Karttunen's IntSeq-library.
    (definec (A249337 n) (if (<= n 2) n (let ((s (A056239 (A249337 (- n 1))))) (let loop ((i (- n 1)) (k 0)) (cond ((zero? i) k) ((= (A056239 (A249337 i)) s) (loop (- i 1) (+ k 1))) (else (loop (- i 1) k))))))) ;; Slow, quadratic time implementation.

Formula

a(1) = 1, a(2) = 2; for n>2, a(n) = number of values k in range 1 .. n-1 such that A056239(a(k)) = A056239(a(n-1)).

A249072 Sum of prime indices in the prime factorization of A249337(n), counted with multiplicity: a(n) = A056239(A249337(n)).

Original entry on oeis.org

0, 1, 0, 1, 1, 2, 0, 2, 1, 2, 2, 2, 3, 0, 2, 3, 1, 3, 2, 4, 0, 3, 2, 3, 3, 3, 4, 1, 3, 3, 4, 2, 4, 2, 4, 3, 4, 3, 5, 0, 3, 4, 4, 3, 6, 0, 4, 4, 4, 5, 1, 4, 4, 6, 1, 3, 5, 2, 5, 2, 4, 5, 3, 5, 3, 4, 5, 4, 4, 7, 0, 3, 7, 1, 4, 5, 3, 5, 4, 8, 0, 4, 5, 4, 6, 2, 6, 2, 5, 5, 4, 6, 3, 8, 1, 4, 9, 0
Offset: 1

Views

Author

Antti Karttunen, Oct 26 2014

Keywords

Crossrefs

Cf. A249341 (positions of zeros), A249342 (positions of records).

Programs

  • PARI
    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]))); }
    A249072_write_bfile(up_to_n) = { my(counts, n, a_k, a_n); counts = vector(up_to_n); a_k = 1; for(n = 1, up_to_n, a_n = A056239(a_k); write("b249072_upto12580.txt", n, " ", a_n); counts[1+a_n]++; if(1 == n, a_k = 2, a_k = counts[1+a_n])); };
    A249072_write_bfile(12580);
    
  • Scheme
    (define (A249072 n) (A056239 (A249337 n)))

Formula

a(n) = A056239(A249337(n)).

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.
Showing 1-3 of 3 results.