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

A364568 a(n) = A290077(n) - A364567(n).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 2, 0, -2, 0, 4, 0, 12, 2, 10, 0, -6, -2, 4, 0, 16, 4, 16, 0, 26, 12, 32, 4, 84, 10, 38, 0, -20, -6, 4, -4, 24, 4, 20, 0, 44, 16, 40, 8, 104, 16, 56, 0, 78, 26, 68, 24, 152, 32, 104, 8, 262, 84, 184, 20, 468, 38, 130, 0, -48, -20, -8, -12, 16, 4, 28, -8, 40, 24, 64, 8, 168, 20, 76, 0, 88, 44, 104, 32
Offset: 0

Views

Author

Antti Karttunen, Aug 05 2023

Keywords

Crossrefs

Programs

  • PARI
    A290077(n) = { my(p=2,z=1); while(n, if(!(n%2), p=nextprime(1+p), z *= (p-(1==(n%4)))); n>>=1); (z); };
    A364567(n) = if(!n,n, my(i=1); while(n>1, if((n%4)!=1, i<<=1); n >>= 1); (i));
    A364568(n) = (A290077(n) - A364567(n));

Formula

For n > 0, a(n) = -A364558(A005940(1+n)) = A000010(A005940(1+n)) - 2^A033265(n).

A033265 Number of i such that d(i) >= d(i-1), where Sum_{i=0..m} d(i)*2^i is the base-2 representation of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 4, 3, 3, 3, 3, 2, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 4, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 5, 4, 4, 4, 4, 3, 4, 4, 5, 4, 4, 4, 5, 4, 5, 5, 6, 5, 5, 5, 5, 4, 5, 5, 5, 4, 4, 4, 5, 4, 5, 5, 5, 4, 4, 4, 4, 3, 4, 4, 5, 4, 4
Offset: 1

Views

Author

Keywords

Examples

			The base-2 representation of n=4 is 100 with d(0)=0, d(1)=0, d(2)=1. There are two rise-or-equal, one from d(0) to d(1) and one from d(1) to d(2), so a(4)=2. - _R. J. Mathar_, Oct 16 2015
		

Crossrefs

Programs

  • Maple
    A033265 := proc(n)
        a := 0 ;
        dgs := convert(n,base,2);
        for i from 2 to nops(dgs) do
            if op(i,dgs)>=op(i-1,dgs) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Oct 16 2015
  • PARI
    A033265(n) = { my(i=0); while(n>1, if((n%4)!=1, i++); n >>= 1); (i); }; \\ Antti Karttunen, Aug 06 2023

Formula

From Ralf Stephan, Oct 05 2003: (Start)
a(0) = 0, a(2n) = a(n) + 1, a(2n+1) = a(n) + [n odd].
a(n) = A014081(n) + A023416(n).
G.f.: 1/(1-x) * Sum_{k>=0} (t^2 + t^3 + t^4)/((1+t)*(1+t^2)), t=x^2^k. (End)
a(n) = -1 + A297113(A005940(1+n)). - Antti Karttunen, Dec 30 2017

Extensions

Sign in Name corrected by R. J. Mathar, Oct 16 2015

A364571 a(n) = A297171(A163511(n)), where A297171 is the Möbius transform of the inverse permutation of A163511.

Original entry on oeis.org

0, 1, 1, 3, 2, 2, 2, 7, 4, 4, 2, 4, 5, 3, 6, 15, 8, 8, 4, 8, 4, 4, 4, 8, 10, 10, 4, 5, 13, 11, 14, 31, 16, 16, 8, 16, 8, 8, 8, 16, 8, 8, 4, 8, 8, 8, 8, 16, 20, 20, 10, 20, 7, 9, 6, 9, 26, 26, 12, 21, 29, 27, 30, 63, 32, 32, 16, 32, 16, 16, 16, 32, 16, 16, 8, 16, 16, 16, 16, 32, 16, 16, 8, 16, 8, 8, 8, 16, 16, 16
Offset: 0

Views

Author

Antti Karttunen, Aug 05 2023

Keywords

Crossrefs

Cf. also A364567.

Programs

Formula

a(n) = A297171(A163511(n)).

A364953 a(n) = A364952(A005940(1+n)), where A364952 is Dirichlet inverse of A364557, which is Möbius transform of A005941 [the inverse permutation of A005940].

Original entry on oeis.org

1, -1, -2, -1, -4, 2, 0, -1, -8, 4, 12, 2, 8, 0, 0, -1, -16, 8, 24, 4, 56, -12, -8, 2, 48, -8, -40, 0, -16, 0, 0, -1, -32, 16, 48, 8, 112, -24, -16, 4, 240, -56, -232, -12, -208, 8, 0, 2, 224, -48, -208, -8, -528, 40, 64, 0, -288, 16, 112, 0, 32, 0, 0, -1, -64, 32, 96, 16, 224, -48, -32, 8, 480, -112, -464, -24
Offset: 0

Views

Author

Antti Karttunen, Aug 29 2023

Keywords

Crossrefs

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A364557(n) = if(1==n, 1, 2^(primepi(vecmax(factor(n)[, 1]))+(bigomega(n)-omega(n))-1));
    memoA364952 = Map();
    A364952(n) = if(1==n,1,my(v); if(mapisdefined(memoA364952,n,&v), v, v = -sumdiv(n,d,if(dA364557(n/d)*A364952(d),0)); mapput(memoA364952,n,v); (v)));
    A364953(n) = A364952(A005940(1+n));
Showing 1-4 of 4 results.