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-2 of 2 results.

A319687 a(n) = A318509(n) - A002487(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, -2, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 4, 0, 4, 0, 0, 2, 0, 0, 6, 0, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 2, 0, 0, -2, -6, 0, -4, 0, 0, 0, -4, 0, -6, 0, 10, 0, 0, 0, 4, 2, 0, -2, 0, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Comments

All terms seem to be even. See the conjecture given in A261179.

Crossrefs

Programs

  • PARI
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A318509(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = A002487(f[i, 1])); factorback(f); };
    A319687(n) = (A318509(n) - A002487(n));
    
  • Python
    from math import prod
    from functools import reduce
    from sympy import factorint
    def A319687(n): return prod(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(p)[-1:2:-1],(1,0)))**e for p, e in factorint(n).items())-sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n)[-1:2:-1],(1,0))) # Chai Wah Wu, May 18 2023

Formula

a(n) = A318509(n) - A002487(n).

A318510 Completely multiplicative with a(prime(k)) = A002487(prime(k+1)).

Original entry on oeis.org

1, 2, 3, 4, 3, 6, 5, 8, 9, 6, 5, 12, 5, 10, 9, 16, 7, 18, 7, 12, 15, 10, 7, 24, 9, 10, 27, 20, 5, 18, 11, 32, 15, 14, 15, 36, 11, 14, 15, 24, 13, 30, 9, 20, 27, 14, 13, 48, 25, 18, 21, 20, 11, 54, 15, 40, 21, 10, 9, 36, 11, 22, 45, 64, 15, 30, 13, 28, 21, 30, 15, 72, 13, 22, 27, 28, 25, 30, 19, 48, 81, 26, 17, 60, 21, 18, 15, 40
Offset: 1

Views

Author

Antti Karttunen, Aug 30 2018

Keywords

Comments

Provided that the conjecture given in A261179 holds, then for all n >= 1, A007814(a(n)) = A007814(n), i.e., then the sequence preserves the 2-adic valuation of n.

Crossrefs

Programs

  • PARI
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A318510(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = A002487(prime(1+primepi(f[i, 1])))); factorback(f); };
    
  • Python
    from math import prod
    from functools import reduce
    from sympy import factorint, nextprime
    def A318510(n): return prod(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(nextprime(p))[-1:2:-1],(1,0)))**e for p, e in factorint(n).items()) # Chai Wah Wu, May 18 2023

Formula

a(n) = A318509(A003961(n)).
Showing 1-2 of 2 results.