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.

Previous Showing 21-30 of 86 results. Next

A210826 G.f.: Sum_{n>=1} a(n)*x^n/(1 - x^n) = Sum_{n>=1} x^(n^3).

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Mar 27 2012

Keywords

Comments

Compare to Liouville's function lambda (A008836) which satisfies the Lambert series identity: Sum_{n>=1} lambda(n)*x^n/(1-x^n) = Sum_{n>=1} x^(n^2).
This is a multiplicative sequence with Dirichlet g.f. zeta(3s)/zeta(s) and inverse Mobius transform in A010057. - R. J. Mathar, Mar 31 2012

Examples

			G.f.: x/(1-x) - x^2/(1-x^2) - x^3/(1-x^3) - x^5/(1-x^5) + x^6/(1-x^6) - x^7/(1-x^7) + x^8/(1-x^8) + x^10/(1-x^10) - x^11/(1-x^11) + ... + a(n)*x^n/(1-x^n) + ...
= x + x^8 + x^27 + x^64 + x^125 + x^216 + x^343 + ... + x^(n^3) + ...
		

Crossrefs

Cf. A008836, A010057, A059269, A212793 (Dirichlet inverse), A219009.

Programs

  • Maple
    Z := proc(n,k)
        local a,pf,e ;
        a := 1 ;
        for pf in ifactors(n)[2] do
            e := pf[2] ;
            if modp(e,k) = 0 then
                ;
            elif modp(e,k) = 1 then
                a := -a ;
            else
                a := 0 ;
            end if;
        end do;
        a;
    end proc:
    A210826 := proc(n)
        Z(n,3) ;
    end proc: # R. J. Mathar, May 28 2016
  • Mathematica
    Mod[Table[DivisorSigma[0, n], {n, 1, 100}], 3, -1] (* Geoffrey Critzer, Mar 19 2015 *)
  • PARI
    {a(n) = if( n==0, 0, kronecker( -3, numdiv(n)))}; /* Michael Somos, Mar 28 2012 */
    
  • PARI
    {a(n)=[0,1,-1][numdiv(n)%3+1]} /* a(n) == d(n) (mod 3) */
    
  • PARI
    {a(n)=local(CUBES=sum(k=1, floor(n^(1/3)), x^(k^3))); if(n==1, 1, polcoeff(CUBES-sum(m=1, n-1, a(m)*x^m/(1-x^m+x*O(x^n))), n))}
    
  • PARI
    /* Vectorized form (faster): */
    {A=[1]; for(i=1, 256, print1(A[#A], ", "); A=concat(A, 0); A[#A]=polcoeff(sum(k=1, ceil((#A)^(1/3)), x^(k^3)) - sum(m=1, #A-1, A[m]*x^m/(1-x^m+x*O(x^#A))), #A)); print1(A[#A])}
    {sum(n=1, #A, A[n]*x^n/(1-x^n+O(x^(#A))))} /* Verify Lambert series */
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1-X)/(1-X^3))[n], ", ")) \\ Vaclav Kotesovec, Jun 14 2020
    
  • Python
    from math import prod
    from sympy import factorint
    def A210826(n): return prod((1,-1,0)[e%3] for e in factorint(n).values()) # Chai Wah Wu, Jun 18 2024

Formula

a(n) == d(n) (mod 3), where d(n) is the number of divisors of n;
a(n) = 0 iff the number of divisors of n is divisible by 3 (A059269),
a(n) = 1 iff d(n) == 1 (mod 3),
a(n) = -1 iff d(n) == 2 (mod 3).
Multiplicative with a(p^e) = -1 + ((e+2) mod 3). Thus the Dirichlet g.f. is indeed zeta(3s)/zeta(s). Also sumdiv(n,d,a(d))=1 iff n is a cube, else sumdiv(n,d,a(d))=0 hence Sum_{k=1..n} a(k)*floor(n/k) = floor(n^(1/3)). - Benoit Cloitre, Oct 28 2012

A280618 Expansion of (Sum_{k>=1} x^(k^3))^2.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Jan 06 2017

Keywords

Comments

Number of ways to write n as an ordered sum of two positive cubes.

Examples

			a(9) = 2 because we have [8, 1] and [1, 8].
		

Crossrefs

Cf. A000578, A001235 (positions of terms > 3), A003325 (of nonzero terms), A010057, A063725, A173677.

Programs

  • Mathematica
    nmax = 150; CoefficientList[Series[(Sum[x^(k^3), {k, 1, nmax}])^2, {x, 0, nmax}], x]
  • PARI
    A010057(n) = ispower(n, 3);
    A280618(n) = if(n<2, 0, sum(r=1,sqrtnint(n-1,3),A010057(n-(r^3)))); \\ Antti Karttunen, Nov 30 2021

Formula

G.f.: (Sum_{k>=1} x^(k^3))^2.

A048927 Numbers that are the sum of 5 positive cubes in exactly 2 ways.

Original entry on oeis.org

157, 220, 227, 246, 253, 260, 267, 279, 283, 286, 305, 316, 323, 342, 344, 361, 368, 377, 379, 384, 403, 410, 435, 440, 442, 468, 475, 487, 494, 501, 523, 530, 531, 549, 562, 568, 586, 592, 594, 595, 599, 602, 621, 625, 640, 647, 657, 658, 683, 703, 710
Offset: 1

Views

Author

Keywords

Comments

It appears that this sequence has 15416 terms, the last of which is 2243453. - Donovan Johnson, Jan 11 2013
From a(1) = 157 we see that c(n) = (number of ways n is the sum of 5 cubes) coincides with A010057 = characteristic function of cubes, up to n = 156. This sequence lists the numbers n for which c(n) = 2. See A003328 for c(n) > 0 and A048926 for c(n) = 1. - M. F. Hasler, Jan 04 2023

Crossrefs

Cf. A003328 (sums of 5 positive cubes), A025404, A048926 (sum of 5 positive cubes in exactly 1 way), A048930, A294736, A343702, A343705, A344237.

Programs

  • Mathematica
    Select[ Range[ 1000], (test = Length[ Select[ PowersRepresentations[#, 5, 3], And @@ (Positive /@ #)& ] ] == 2; If[test, Print[#]]; test)& ](* Jean-François Alcover, Nov 09 2012 *)
  • PARI
    (waycount(n,numcubes,imax)={if(numcubes==0, !n, sum(i=1,imax, waycount(n-i^3,numcubes-1,i)))}); isA048927(n)=(waycount(n,5,floor(n^(1/3)))==2); \\ Michael B. Porter, Sep 27 2009
  • Python
    def ways (n, left = 5, last = 1):
      a = last; a3 = a**3; c = 0
      while a3 <= n-left+1:
        if left > 1:
           c += ways(n-a3, left-1, a)
        elif a3 == n:
           c += 1
        a += 1; a3 = a**3
      return c
    for n in range (1,1000): # to print this sequence
      if ways(n)==2: print(n,end=", ") # in Python2 use, e.g.: print n,
    # Minor edits by M. F. Hasler, Jan 04 2023
    

Extensions

More terms from Walter Hofmann (walterh(AT)gmx.de), Jun 01 2000

A052045 Cubes lacking the digit zero in their decimal expansion.

Original entry on oeis.org

1, 8, 27, 64, 125, 216, 343, 512, 729, 1331, 1728, 2197, 2744, 3375, 4913, 5832, 6859, 9261, 12167, 13824, 15625, 17576, 19683, 21952, 24389, 29791, 32768, 35937, 42875, 46656, 54872, 59319, 68921, 85184, 91125, 97336, 117649, 132651, 148877
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1999

Keywords

Comments

This sequence is infinite since A052427(n)^3 is a term for all n>=0. - Amiram Eldar, Nov 23 2020

Crossrefs

Programs

  • Maple
    select(t -> not has(convert(t,base,10),0), [seq(m^3,m=1..10^3)]); # Robert Israel, Aug 24 2014
  • Mathematica
    Select[Range[53]^3, DigitCount[#, 10, 0] == 0 &] (* Amiram Eldar, Nov 23 2020 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (vecmin(digits(cub=n^3)), print1(cub, ", ")););} \\ Michel Marcus, Aug 25 2014
  • Python
    A052045 = [n**3 for n in range(1,10**5) if not str(n**3).count('0')]
    # Chai Wah Wu, Aug 24 2014
    

Formula

Intersection of A052382 and A000578; A168046(a(n))*A010057(a(n)) = 1. - Reinhard Zumkeller, Dec 01 2009
a(n) = A052044(n)^3. - Amiram Eldar, Nov 23 2020

A322885 Number of 3-generated Abelian groups of order n.

Original entry on oeis.org

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

Views

Author

Álvar Ibeas, Dec 29 2018

Keywords

Comments

Groups generated by fewer than 3 elements are not excluded. The number of Abelian groups with 3 invariant factors is a(n) - A046951(n).
Sum of the first three columns from A249770 (for n > 1).
Dirichlet convolution of A061704 and A010052. Dirichlet convolution of A046951 and A010057.
The number of unordered factorizations of n into biquadratefree power of primes (1 and primes, squares of primes and cubes of primes, A087797). - Amiram Eldar, Jun 12 2025

Crossrefs

Programs

  • Maple
    f:= proc(n) local t;
      mul(round((t[2]+3)^2/12),t=ifactors(n)[2])
    end proc:
    map(f, [$1..200]); # Robert Israel, May 20 2019
  • Mathematica
    a[n_] := Times @@ (Round[(# + 3)^2/12]& /@ FactorInteger[n][[All, 2]]);
    Array[a, 102] (* Jean-François Alcover, Jan 02 2019 *)
  • PARI
    a(n) = vecprod(apply(x -> round((x+3)^2/12), factor(n)[, 2])); \\ Amiram Eldar, Jun 12 2025

Formula

Multiplicative with a(p^e) = A001399(e).
Dirichlet g.f.: zeta(s) * zeta(2s) * zeta(3s).
Sum_{k=1..n} a(k) ~ Pi^2*zeta(3)*n/6 + zeta(1/2)*zeta(3/2)*sqrt(n) + zeta(1/3)*zeta(2/3)*n^(1/3). - Vaclav Kotesovec, Feb 02 2019

A340977 Number of ways to write n as an ordered sum of 4 positive cubes.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 4, 0, 1, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 4, 0, 0, 6, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 24
Offset: 4

Views

Author

Ilya Gutkovskiy, Feb 01 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add((s->
          `if`(s>n, 0, b(n-s, t-1)))(j^3), j=1..iroot(n, 3))))
        end:
    a:= n-> b(n, 4):
    seq(a(n), n=4..100);  # Alois P. Heinz, Feb 01 2021
  • Mathematica
    nmax = 100; CoefficientList[Series[Sum[x^(k^3), {k, 1, Floor[nmax^(1/3)] + 1}]^4, {x, 0, nmax}], x] // Drop[#, 4] &

Formula

G.f.: (Sum_{k>=1} x^(k^3))^4.

A340978 Number of ways to write n as an ordered sum of 5 positive cubes.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 5, 0, 5, 0, 0, 0, 0, 20, 0, 1, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 10, 0, 5, 0, 0, 0, 0, 30, 0, 0, 0, 5, 0, 0, 30, 0, 0, 0, 20, 0, 0, 10, 0, 0, 0, 30, 10, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 20, 0, 5, 10
Offset: 5

Views

Author

Ilya Gutkovskiy, Feb 01 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add((s->
          `if`(s>n, 0, b(n-s, t-1)))(j^3), j=1..iroot(n, 3))))
        end:
    a:= n-> b(n, 5):
    seq(a(n), n=5..97);  # Alois P. Heinz, Feb 01 2021
  • Mathematica
    nmax = 97; CoefficientList[Series[Sum[x^(k^3), {k, 1, Floor[nmax^(1/3)] + 1}]^5, {x, 0, nmax}], x] // Drop[#, 5] &

Formula

G.f.: (Sum_{k>=1} x^(k^3))^5.

A340979 Number of ways to write n as an ordered sum of 6 positive cubes.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 6, 0, 15, 0, 0, 0, 0, 30, 0, 6, 0, 0, 0, 0, 60, 0, 1, 0, 0, 0, 0, 60, 0, 0, 0, 0, 15, 0, 30, 0, 0, 0, 0, 60, 0, 6, 0, 6, 0, 0, 90, 0, 0, 0, 30, 0, 0, 60, 0, 0, 0, 60, 20, 0, 15, 0, 0, 0, 60, 60, 0, 0, 0, 30, 0, 30, 60
Offset: 6

Views

Author

Ilya Gutkovskiy, Feb 01 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add((s->
          `if`(s>n, 0, b(n-s, t-1)))(j^3), j=1..iroot(n, 3))))
        end:
    a:= n-> b(n, 6):
    seq(a(n), n=6..98);  # Alois P. Heinz, Feb 01 2021
  • Mathematica
    nmax = 98; CoefficientList[Series[Sum[x^(k^3), {k, 1, Floor[nmax^(1/3)] + 1}]^6, {x, 0, nmax}], x] // Drop[#, 6] &

Formula

G.f.: (Sum_{k>=1} x^(k^3))^6.

A025446 Number of partitions of n into 2 nonnegative cubes.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(1729) = 2, the first point where a value larger than 1 appears, and where this sequence differs from A373972. - Antti Karttunen, Jun 24 2024

Examples

			From _Antti Karttunen_, Jun 24 2024: (Start)
8 = 0^3 + 2^3, and as there are no other partitions of 8 into 2 nonnegative cubes, a(8) = 1.
16 = 2^3 + 2^3, and as there are no other partitions of 16 into 2 nonnegative cubes, a(16) = 1.
1729 = 1^3 + 12^3 = 9^3 + 10^3, and as there are no other partitions of 1729 into 2 nonnegative cubes, a(1729) = 2.
(End)
		

Crossrefs

Cf. A010057, A025455, A004999 (indices of nonzero terms), A373972 (their characteristic function).

Programs

  • PARI
    A025446(n) = if(n<=2, 1, my(s=0, x=sqrtnint(n,3)); forstep(i=x, 0, -1, my(x3=i^3, y3=n-x3); if(y3>x3, return(s), s += ispower(y3, 3)))); \\ Antti Karttunen, Jun 24 2024

Formula

a(n) = A010057(n) + A025455(n) = A010057(n) XOR A025455(n). [The latter by Fermat's Last Theorem] - Antti Karttunen, Jun 24 2024

Extensions

Data section extended up to a(126) and the secondary offset added by Antti Karttunen, Jun 24 2024

A078429 Number of integers k among 1..n for which gcd(k,n) is a cube.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 5, 6, 4, 10, 4, 12, 6, 8, 9, 16, 6, 18, 8, 12, 10, 22, 10, 20, 12, 19, 12, 28, 8, 30, 18, 20, 16, 24, 12, 36, 18, 24, 20, 40, 12, 42, 20, 24, 22, 46, 18, 42, 20, 32, 24, 52, 19, 40, 30, 36, 28, 58, 16, 60, 30, 36, 37, 48, 20, 66, 32, 44, 24, 70, 30, 72, 36, 40, 36
Offset: 1

Views

Author

Vladeta Jovovic, Dec 29 2002

Keywords

Crossrefs

Cf. A061020, A206369, A327626 (inv. Mob. Trans.).

Programs

  • Mathematica
    nn = 76; f[list_, i_] := list[[i]]; a = Table[If[IntegerQ[n^(1/3)], 1, 0], {n, 1, nn}]; b =Table[EulerPhi[n], {n, 1, nn}]; Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Feb 25 2015 *)
  • PARI
    a(n) = sum(k=1, n, ispower(gcd(n, k), 3)); \\ Michel Marcus, Feb 25 2015
    
  • PARI
    a(n) = sumdiv(n, d, eulerphi(n/d) * ispower(d, 3)); \\ Daniel Suteu, Jun 27 2018

Formula

a(n) is multiplicative.
G.f. for a(p^n), p a prime, is given by 1/(1+x+x^2)/(1-p*x).
a(2^n) = A077947(n), a(3^n) = A077834(n).
a(p) = p-1, a(p^2) = p*(p-1), a(p^3) = p^3-p^2+1, a(p^4) = (p-1)*(p+1)*(p^2-p+1), ...
Dirichlet g.f.: zeta(s - 1)*zeta(3*s)/zeta(s). - Geoffrey Critzer, Feb 25 2015
a(n) = Sum_{d|n, d is a perfect cube} phi(n/d), where phi(k) is the Euler totient function. Dirichlet convolution of A000010 and A010057. - Daniel Suteu, Jun 27 2018
Sum_{k=1..n} a(k) ~ Pi^4 * n^2 / 315. - Vaclav Kotesovec, Feb 07 2019
Dirichlet convolution of A000027 and A210826. - R. J. Mathar, Jun 05 2020
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} A010057(gcd(n,k)).
a(n) = Sum_{k=1..n} A010057(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
Previous Showing 21-30 of 86 results. Next