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.

A324348 a(n) = A294898(A005940(1+n)), where A294898(k) = A005187(k) - A000203(k).

Original entry on oeis.org

0, 0, 0, 0, 2, -2, 3, 0, 3, 0, 2, -6, 16, -5, 10, 0, 7, 1, 7, -4, 19, -16, 8, -14, 38, 4, 22, -21, 88, -16, 38, 0, 9, 5, 16, -3, 33, -15, 16, -12, 54, -7, 14, -52, 96, -58, 26, -30, 104, 22, 62, -20, 142, -76, 43, -53, 280, 26, 119, -68, 464, -42, 116, 0, 14, 7, 18, 1, 44, -14, 38, -11, 65, -1, 38, -59, 174, -66, 52, -28, 113, 16, 72, -59, 191, -160, 0, -124
Offset: 0

Views

Author

Antti Karttunen, Feb 24 2019

Keywords

Comments

Positions of zeros is given by the sequence A156552(A295296(n)), n >= 1, sorted into ascending order: 0, 1, 2, 3, 7, 9, 15, 31, 63, 86, 127, 255, 511, 519, 1023, 2047, 4095, 8191, 16383, 32767, ...

Crossrefs

Programs

  • PARI
    A324348(n) = { my(m1=2, m2=1, p=2, mp=p*p); while(n, if(!(n%2), p=nextprime(1+p); mp = p*p, m1 *= p; if(3==(n%4), mp *= p, m2 *= (mp-1)/(p-1))); n>>=1); ((m1-m2)-hammingweight(m1)); };
    
  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A294898(n) = (A005187(n) - sigma(n));
    A324348(n) = A294898(A005940(1+n));

Formula

a(n) = A294898(A005940(1+n)).
a(n) = A324055(n) - A000120(A005940(1+n)).