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-10 of 18 results. Next

A355691 Dirichlet inverse of A320111, number of divisors of n that are not of the form 4k+2.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 15 2022

Keywords

Comments

Multiplicative because A320111 is.

Crossrefs

Cf. A320111.
Cf. also A355690.
Cf. A010892.

Programs

  • Mathematica
    f[2, e_] := Switch[Mod[e, 6], 0, 0, 1, -1, 2, -1, 3, 0, 4, 1, 5, 1]; f[p_, 1] = -2; f[p_, 2] = 1; f[p_, e_] := 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 30 2022 *)
  • PARI
    A320111(n) = sumdiv(n,d,(2!=(d%4)));
    memoA355691 = Map();
    A355691(n) = if(1==n,1,my(v); if(mapisdefined(memoA355691,n,&v), v, v = -sumdiv(n,d,if(dA320111(n/d)*A355691(d),0)); mapput(memoA355691,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA320111(n/d) * a(d).
Multiplicative with a(2^e) = A010892(e+2) and for a prime p > 2, a(p) = -2, a(p^2) = 1 and a(p^e) = 0 when e > 2. - Sebastian Karlsson, Oct 21 2022
Dirichlet g.f.: 4^s/(zeta(s)^2*(1 - 2^s + 4^s)). - Amiram Eldar, Dec 30 2022

A183063 Number of even divisors of n.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Dec 22 2010

Keywords

Comments

Number of divisors of n that are divisible by 2. More generally, it appears that the sequence formed by starting with an initial set of k-1 zeros followed by the members of A000005, with k-1 zeros between every one of them, can be defined as "the number of divisors of n that are divisible by k", (k >= 1). For example if k = 1 we have A000005 by definition, if k = 2 we have this sequence. Note that if k >= 3 the sequences are not included in the OEIS because the usual OEIS policy is not to include sequences like this where alternate terms are zero; this is an exception. - Omar E. Pol, Oct 18 2011
Number of zeros in n-th row of triangle A247795. - Reinhard Zumkeller, Sep 28 2014
a(n) is also the number of partitions of n into equal parts, minus the number of partitions of n into consecutive parts. - Omar E. Pol, May 04 2017
a(n) is also the number of partitions of n into an even number of equal parts. - Omar E. Pol, May 14 2017

Examples

			For n = 12, set of even divisors is {2, 4, 6, 12}, so a(12) = 4.
On the other hand, there are six partitions of 12 into equal parts: [12], [6, 6], [4, 4, 4], [3, 3, 3, 3], [2, 2, 2, 2, 2, 2] and [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]. And there are two partitions of 12 into consecutive parts: [12] and [5, 4, 3], so a(12) = 6 - 2 = 4, equaling the number of even divisors of 12. - _Omar E. Pol_, May 04 2017
		

Crossrefs

Programs

  • Haskell
    a183063 = sum . map (1 -) . a247795_row
    -- Reinhard Zumkeller, Sep 28 2014, Jan 15 2013, Jan 10 2012
    
  • Magma
    [IsOdd(n) select 0 else #[d:d in Divisors(n)|IsEven(d)]:n in [1..100]]; // Marius A. Burtea, Dec 16 2019
    
  • Maple
    A183063 := proc(n)
        if type(n,'even') then
            numtheory[tau](n/2) ;
        else
            0;
        end if;
    end proc: # R. J. Mathar, Jun 18 2015
  • Mathematica
    Table[Length[Select[Divisors[n], EvenQ]], {n, 90}] (* Alonso del Arte, Jan 10 2012 *)
    a[n_] := (e = IntegerExponent[n, 2]) * DivisorSigma[0, n / 2^e]; Array[a, 100] (* Amiram Eldar, Jul 06 2022 *)
  • PARI
    a(n)=if(n%2,0,numdiv(n/2)) \\ Charles R Greathouse IV, Jul 29 2011
    
  • Python
    from sympy import divisor_count
    def A183063(n): return divisor_count(n>>(m:=(~n&n-1).bit_length()))*m # Chai Wah Wu, Jul 16 2022
  • Sage
    def A183063(n): return len([1 for d in divisors(n) if is_even(d)])
    [A183063(n) for n in (1..80)]  # Peter Luschny, Feb 01 2012
    

Formula

a(n) = A000005(n) - A001227(n).
a(2n-1) = 0; a(2n) = A000005(n).
G.f.: Sum_{d>=1} x^(2*d)/(1 - x^(2*d)) and generally for the number of divisors that are divisible by k: Sum_{d>=1} x^(k*d)/(1 - x^(k*d)). - Geoffrey Critzer, Apr 15 2014
Dirichlet g.f.: zeta(s)^2/2^s and generally for the number of divisors that are divisible by k: zeta(s)^2/k^s. - Geoffrey Critzer, Mar 28 2015
From Ridouane Oudra, Sep 02 2019: (Start)
a(n) = Sum_{i=1..n} (floor(n/(2*i)) - floor((n-1)/(2*i))).
a(n) = 2*A000005(n) - A000005(2n). (End)
Conjecture: a(n) = lim_{x->n} f(Pi*x), where f(x) = sin(x)*Sum_{k>0} (cot(x/(2*k))/(2*k) - 1/x). - Velin Yanev, Dec 16 2019
a(n) = A000005(A000265(n))*A007814(n) - Chai Wah Wu, Jul 16 2022
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma - 1/2 - log(2)/2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022
Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A000005(k) = 1-log(2) (A244009). - Amiram Eldar, Mar 01 2023

Extensions

Formula corrected by Charles R Greathouse IV, Jul 29 2011

A152822 Periodic sequence [1,1,0,1] of length 4.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1
Offset: 0

Views

Author

Richard Choulet, Dec 13 2008

Keywords

Crossrefs

Characteristic function of A042965.
Cf. A026052, A026064, A320111 (inverse Möbius transform).
Sequence A166486 shifted by two terms.

Programs

Formula

a(n) = 3/4 - (1/4)*(-1)^n + (1/2)*cos(n*Pi/2);
a(n+4) = a(n) with a(0) = a(1) = a(3) = 1 and a(2) = 0;
O.g.f.: (1+z+z^3)/(1-z^4);
a(n) = ceiling(cos(Pi*n/4)^2). - Wesley Ivan Hurt, Jun 12 2013
From Antti Karttunen, May 03 2022: (Start)
Multiplicative with a(p^e) = 1 for odd primes, and a(2^e) = [e > 1]. (Here [ ] is the Iverson bracket, i.e., a(2^e) = 0 if e=1, and 1 if e>1).
a(n) = A166486(2+n).
(End)
Dirichlet g.f.: zeta(s)*(1 - 1/2^s + 1/4^s). - Amiram Eldar, Dec 27 2022

Extensions

More terms from Philippe Deléham, Dec 21 2008
Keyword:mult added by Andrew Howroyd, Jul 27 2018

A320107 a(n) = A001227(A252463(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 22 2018

Keywords

Comments

Records 1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 20, 24, 32, 36, 40, ... occur at n = 1, 5, 18, 30, 90, 210, 450, 630, 1890, 3150, 5670, 6930, 20790, 34650, 62370, ...

Crossrefs

Cf. A001227, A005940, A051064, A055457, A252463, A320106 (Möbius transform).

Programs

Formula

a(n) = A001227(A252463(n)).
a(1) = a(2) = 1; for n > 2, a(n) = a(n/2) when n == 0 mod 4, a(n) = A051064(n) * a(n/2) when n == 2 mod 4, a(n) = a(A064989(n)), when n == 3 mod 6, otherwise a(n) = A055457(n) * a(A064989(n)).
For n > 2, let p = A252463(n). If p is even, then a(n) = a(p), if p is odd, then a(n) = A051064(p) * a(p).

A069735 Number of regular orientable coverings of the Klein bottle with 2n lists.

Original entry on oeis.org

1, 3, 2, 5, 2, 6, 2, 7, 3, 6, 2, 10, 2, 6, 4, 9, 2, 9, 2, 10, 4, 6, 2, 14, 3, 6, 4, 10, 2, 12, 2, 11, 4, 6, 4, 15, 2, 6, 4, 14, 2, 12, 2, 10, 6, 6, 2, 18, 3, 9, 4, 10, 2, 12, 4, 14, 4, 6, 2, 20, 2, 6, 6, 13, 4, 12, 2, 10, 4, 12, 2, 21, 2, 6, 6, 10, 4, 12, 2, 18, 5, 6, 2, 20, 4, 6, 4, 14, 2, 18
Offset: 1

Views

Author

Valery A. Liskovets, Apr 07 2002

Keywords

Comments

Dirichlet convolution of A000012 by A040001. - R. J. Mathar, Mar 30 2011
a(n) is the number of full-dimensional lattices with volume n in Z^2 which are symmetric about a coordinate axis (equivalently, about both). - Álvar Ibeas, Mar 19 2021

Examples

			x + 3*x^2 + 2*x^3 + 5*x^4 + 2*x^5 + 6*x^6 + 2*x^7 + 7*x^8 + 3*x^9 + 6*x^10 + ...
		

Crossrefs

Equals row sums of triangle A143110. - Gary W. Adamson, Jul 25 2008

Programs

  • Maple
    read("transforms") : nmax := 100 :
    L := [1,1,seq(0,i=1..nmax)] :
    MOBIUSi(%) :
    MOBIUSi(%) ; # R. J. Mathar, Sep 25 2017
    with(NumberTheory): seq(tau(n) + `if`(n::odd, 0, tau(n/2)), n=1..100); # Peter Luschny, Mar 19 2021
  • Mathematica
    d[n_] := DivisorSigma[0, n];
    a[n_] := If[EvenQ[n], d[n] + d[n/2], d[n]];
    Array[a, 100] (* Jean-François Alcover, Aug 27 2019 *)
  • PARI
    {a(n) = if( n<1, 0, numdiv(n) + if( n%2, 0, numdiv( n / 2)))} /* Michael Somos, Mar 24 2012 */

Formula

Multiplicative with a(2^e)=2e+1 and a(p^e)=e+1 for e>0 and an odd prime p.
a(n) = d(n)+d(n/2) for even n and a(n) = d(n) otherwise where d(n) is the number of divisors of n (A000005).
G.f.: Sum_{k>0} x^k*(1+2*x^k)/(1-x^(2*k)). - Vladeta Jovovic, Dec 16 2002
Dirichlet g.f.: (1+2^(-s))*zeta^2(s) [ Rutherford]. - N. J. A. Sloane, Feb 23 2009
Moebius transform is period 2 sequence [ 1, 2, ...]. - Michael Somos, Mar 24 2012
a(2*n - 1) = A099774(n).
a(n) = Sum_{ m: m^2|n } A304182(n/m^2). - Andrey Zabolotskiy, May 07 2018
Sum_{k=1..n} a(k) ~ 3*n*log(n)/2 + (3*gamma - 3/2 - log(2)/2)*n, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Oct 04 2019
a(n) = 3*tau(n) - tau(2*n). - Ridouane Oudra, Mar 15 2021
a(n) = A320111(n) + (A059841(n)*A000005(n)), i.e. a(n) = A320111(n) if n is odd, and a(n) = A320111(n) + A000005(n) if n is even. - Antti Karttunen, Mar 17 2021
a(n) = A000005(n) + A183063(n) = 2*A000005(n) - A001227(n). - Amiram Eldar, Dec 22 2023

Extensions

Corrected by T. D. Noe, Nov 13 2006

A319703 a(n) = A003415(A252463(n)).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 4, 4, 1, 1, 5, 1, 1, 5, 12, 1, 6, 1, 7, 7, 1, 1, 16, 6, 1, 12, 9, 1, 8, 1, 32, 9, 1, 8, 21, 1, 1, 13, 24, 1, 10, 1, 13, 16, 1, 1, 44, 10, 10, 15, 15, 1, 27, 10, 32, 19, 1, 1, 31, 1, 1, 24, 80, 14, 14, 1, 19, 21, 12, 1, 60, 1, 1, 21, 21, 12, 16, 1, 68, 32, 1, 1, 41, 16, 1, 25, 48, 1, 39, 16, 25, 31, 1
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2018

Keywords

Crossrefs

Programs

  • PARI
    A003415(n) = {my(fac); if(n<1, 0, fac=factor(n); sum(i=1, matsize(fac)[1], n*fac[i, 2]/fac[i, 1]))}; \\ From A003415
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A319703(n) = A003415(A252463(n));

Formula

a(n) = A003415(A252463(n)).

A319699 a(n) = A001065(A252463(n)).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 3, 3, 1, 1, 6, 1, 1, 6, 7, 1, 4, 1, 8, 8, 1, 1, 16, 4, 1, 7, 10, 1, 9, 1, 15, 10, 1, 9, 21, 1, 1, 14, 22, 1, 11, 1, 14, 16, 1, 1, 36, 6, 6, 16, 16, 1, 13, 11, 28, 20, 1, 1, 42, 1, 1, 22, 31, 15, 15, 1, 20, 22, 13, 1, 55, 1, 1, 21, 22, 13, 17, 1, 50, 15, 1, 1, 54, 17, 1, 26, 40, 1, 33, 17, 26, 32, 1, 21, 76, 1, 8, 28, 43, 1, 21, 1, 46, 42
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2018

Keywords

Comments

Also for n > 1, sum of A318889(x) for all x encountered when map x -> A252463(x) is iterated, starting from x = A252463(n), until 1 is reached.

Crossrefs

Programs

Formula

a(n) = A001065(A252463(n)).
a(n) = A001065(n) - A318889(n).

A319700 a(n) = A051953(A252463(n)).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 4, 4, 1, 3, 1, 6, 6, 1, 1, 8, 3, 1, 4, 8, 1, 7, 1, 8, 8, 1, 7, 12, 1, 1, 12, 12, 1, 9, 1, 12, 8, 1, 1, 16, 5, 5, 14, 14, 1, 9, 9, 16, 18, 1, 1, 22, 1, 1, 12, 16, 13, 13, 1, 18, 20, 11, 1, 24, 1, 1, 12, 20, 11, 15, 1, 24, 8, 1, 1, 30, 15, 1, 24, 24, 1, 21, 15, 24, 30, 1, 19, 32, 1, 7, 16, 30, 1, 19, 1, 28, 22
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2018

Keywords

Crossrefs

Programs

  • PARI
    A051953(n) = (n - eulerphi(n));
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A319700(n) = A051953(A252463(n));

Formula

a(n) = A051953(A252463(n)).

A319989 a(n) = A303757(A252463(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 22 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Block[{s = Table[Which[n == 1, 1, EvenQ@n, n/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n], {n, 120}], t}, t = EulerPhi@ Range@ Max@ s; Map[Function[n, Count[t[[2 ;; n]], ?(# == t[[n]] &)]], s] /. 0 -> 1] (* _Michael De Vlieger, Nov 23 2018 *)
  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    Aux303757(n) = if(1==n,0,eulerphi(n));
    v303757 = ordinal_transform(vector(up_to,n,Aux303757(n)));
    A303757(n) = v303757[n];
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A319989(n) = A303757(A252463(n));

Formula

a(n) = A303757(A252463(n)).

A322805 Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(1)=0, f(2)=1, f(n)=-1 for odd primes, and f(n) = A252463(n) for any other number.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 3, 6, 6, 7, 3, 8, 3, 9, 8, 10, 3, 11, 3, 12, 12, 13, 3, 14, 11, 15, 10, 16, 3, 17, 3, 18, 16, 19, 17, 20, 3, 21, 22, 23, 3, 24, 3, 22, 14, 25, 3, 26, 27, 27, 28, 28, 3, 29, 24, 30, 31, 32, 3, 33, 3, 34, 23, 35, 36, 36, 3, 31, 37, 38, 3, 39, 3, 40, 20, 37, 38, 41, 3, 42, 18, 43, 3, 44, 41, 45, 46, 47, 3, 48, 49, 46, 50, 51, 52, 53, 3, 54, 30, 55, 3, 52, 3, 56, 33
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2018

Keywords

Comments

For all i, j:
a(i) = a(j) => A319694(i) = A319694(j),
a(i) = a(j) => A319699(i) = A319699(j),
a(i) = a(j) => A319700(i) = A319700(j),
a(i) = a(j) => A319703(i) = A319703(j),
a(i) = a(j) => A319989(i) = A319989(j),
a(i) = a(j) => A320110(i) = A320110(j) => A320111(i) = A320111(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A322805aux(n) = if(n<=2,n-1,if(isprime(n),-1,A252463(n)));
    v322805 = rgs_transform(vector(up_to,n,A322805aux(n)));
    A322805(n) = v322805[n];
Showing 1-10 of 18 results. Next