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

A046913 Sum of divisors of n not congruent to 0 mod 3.

Original entry on oeis.org

1, 3, 1, 7, 6, 3, 8, 15, 1, 18, 12, 7, 14, 24, 6, 31, 18, 3, 20, 42, 8, 36, 24, 15, 31, 42, 1, 56, 30, 18, 32, 63, 12, 54, 48, 7, 38, 60, 14, 90, 42, 24, 44, 84, 6, 72, 48, 31, 57, 93, 18, 98, 54, 3, 72, 120, 20, 90, 60, 42, 62, 96, 8, 127, 84, 36, 68, 126
Offset: 1

Views

Author

Keywords

Examples

			Divisors of 12 are 1 2 3 4 6 12 and discarding 3 6 and 12 we get a(12) = 1 + 2 + 4 = 7.
x + 3*x^2 + x^3 + 7*x^4 + 6*x^5 + 3*x^6 + 8*x^7 + 15*x^8 + x^9 + 18*x^10 + ...
		

Crossrefs

Programs

  • Magma
    [SumOfDivisors(3*k)-3*SumOfDivisors(k):k in [1..70]]; // Marius A. Burtea, Jun 01 2019
  • Mathematica
    Table[DivisorSigma[1, 3*w]-3*DivisorSigma[1, w], {w, 1, 256}]
    DivisorSum[#1, # &, Mod[#, 3] != 0 &] & /@ Range[68] (* Jayanta Basu, Jun 30 2013 *)
    f[p_, e_] := If[p == 3, 1, (p^(e+1)-1)/(p-1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 17 2020 *)
  • PARI
    {a(n) = if( n<1, 0, sigma(3*n) - 3 * sigma(n))} /* Michael Somos, Jul 19 2004 */
    
  • PARI
    a(n) = sigma(n \ 3^valuation(n, 3)) \\ David A. Corneth, Jun 01 2019
    

Formula

Multiplicative with a(3^e) = 1, a(p^e) = (p^(e+1)-1)/(p-1) for p<>3. - Vladeta Jovovic, Sep 11 2002
G.f.: Sum_{k>0} x^k*(1+2*x^k+2*x^(3*k)+x^(4*k))/(1-x^(3*k))^2. - Vladeta Jovovic, Dec 18 2002
a(n) = A000203(3n)-3*A000203(n). - Labos Elemer, Aug 14 2003
Inverse Mobius transform of A091684. - Gary W. Adamson, Jul 03 2008
Dirichlet g.f.: zeta(s)*zeta(s-1)*(1-1/3^(s-1)). - R. J. Mathar, Feb 10 2011
G.f. A(x) satisfies: 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w)= u^2 + 9 * v^2 + 16 * w^2 - 6 * u*v + 4 * u*w - 24 * v*w - v + w. - Michael Somos, Jul 19 2004
L.g.f.: log(Product_{k>=1} (1 - x^(3*k))/(1 - x^k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Mar 14 2018
a(n) = A002324(n) + 3*Sum_{j=1, n-1} A002324(j)*A002324(n-j). See Farkas and Guerzhoy links. - Michel Marcus, Jun 01 2019
a(3*n) = a(n). - David A. Corneth, Jun 01 2019
Sum_{k=1..n} a(k) ~ Pi^2 * n^2 / 18. - Vaclav Kotesovec, Sep 17 2020

A068626 a(3n) = a(3n-1) = 3*n^2, a(3n-2) = 3*n^2 - 3*n + 1.

Original entry on oeis.org

1, 3, 3, 7, 12, 12, 19, 27, 27, 37, 48, 48, 61, 75, 75, 91, 108, 108, 127, 147, 147, 169, 192, 192, 217, 243, 243, 271, 300, 300, 331, 363, 363, 397, 432, 432, 469, 507, 507, 547, 588, 588, 631, 675, 675, 721, 768, 768, 817, 867, 867, 919, 972, 972, 1027, 1083, 1083, 1141
Offset: 1

Views

Author

Amarnath Murthy, Feb 26 2002

Keywords

Comments

Or, a(1) = 1, a(n) = n + a(n-1) if n does not divide a(n-1) else a(n) = a(n-1). E.g. a(6) = a(5) = 12 as 6 divides 12. a(10) = 10+a(9) = 10+27 = 37.

Crossrefs

Cf. A091684 (first differences).

Programs

  • Magma
    [(n mod 3 eq 1) select (n+2)^2/3 - n-1 else (n+((n mod 3)^2) mod 3 )^2/3  : n in [1..50]]; // Marius A. Burtea, Feb 19 2020
    
  • Mathematica
    LinearRecurrence[{1,0,2,-2,0,-1,1},{1,3,3,7,12,12,19},60] (* Harvey P. Dale, Jun 29 2022 *)
  • PARI
    Vec(x*(1 + 2*x + 2*x^3 + x^4) / ((1 - x)^3*(1 + x + x^2)^2) + O(x^50)) \\ Colin Barker, Feb 19 2020
  • Perl
    my @a = (1); for (my $n = 1; $n <= 90000; $n ++) {
      $a[$n] = $a[$n - 1] + ($a[$n - 1] % $n != 0 ? $n : 0);
      print "$n $a[$n]\n";
    } # Georg Fischer Feb 18 2020
    

Formula

From Colin Barker, Feb 18 2020: (Start)
G.f.: x*(1 + 2*x + 2*x^3 + x^4) / ((1 - x)^3*(1 + x + x^2)^2).
a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7) for n>7.
(End)
Sum_{n>=1} 1/a(n) = Pi/sqrt(3)*tanh(Pi/(2*sqrt(3))) + Pi^2/9. - Amiram Eldar, Sep 21 2023

Extensions

Entry revised by N. J. A. Sloane, Mar 13 2006

A100050 A Chebyshev transform of n.

Original entry on oeis.org

0, 1, 2, 0, -4, -5, 0, 7, 8, 0, -10, -11, 0, 13, 14, 0, -16, -17, 0, 19, 20, 0, -22, -23, 0, 25, 26, 0, -28, -29, 0, 31, 32, 0, -34, -35, 0, 37, 38, 0, -40, -41, 0, 43, 44, 0, -46, -47, 0, 49, 50, 0, -52, -53, 0, 55, 56, 0, -58, -59, 0, 61, 62, 0, -64, -65, 0, 67, 68, 0, -70, -71, 0, 73, 74, 0, -76, -77, 0, 79, 80, 0, -82, -83, 0, 85, 86, 0
Offset: 0

Views

Author

Paul Barry, Oct 31 2004

Keywords

Comments

A Chebyshev transform of x/(1-x)^2: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))A(x/(1+x^2)).

Examples

			x + 2*x^2 - 4*x^4 - 5*x^5 + 7*x^7 + 8*x^8 - 10*x^10 - 11*x^11 + 13*x^13 + ...
		

Crossrefs

Cf. A165202 (partial sums).

Programs

  • Mathematica
    LinearRecurrence[{2, -3, 2, -1}, {0, 1, 2, 0},50] (* G. C. Greubel, Aug 08 2017 *)
  • PARI
    {a(n) = n * (-1)^(n\3) * sign( n%3)} /* Michael Somos, Mar 19 2011 */
    
  • PARI
    {a(n) = local(A, p, e); if( abs(n)<1, 0, A = factor(abs(n)); prod( k=1, matsize(A)[1], if( p=A[k,1], e=A[k,2]; if( p==2, -(-2)^e, (kronecker( -12, p) * p)^e))))} /* Michael Somos, Mar 19 2011 */
  • Sage
    [lucas_number1(n,2,1)*lucas_number1(n,1,1) for n in range(0,88)] # Zerinvary Lajos, Jul 06 2008
    

Formula

Euler transform of length 6 sequence [ 2, -3, -2, 0, 0, 2]. - Michael Somos, Mar 19 2011
a(n) is multiplicative with a(2^e) = -(-2)^e if e>0, a(3^e) = 0^e, a(p^e) = p^e if p == 1 (mod 6), a(p^e) = (-p)^e if p == 5 (mod 6). - Michael Somos, Mar 19 2011
G.f.: x*(1 - x^2)^3 *(1 - x^3)^2 / ((1 - x)^2 *(1 - x^6)^2) = x *(1 + x)^2 *(1 - x^2) / (1 + x^3)^2. - Michael Somos, Mar 19 2011
a(3*n) = 0, a(3*n + 1) = (-1)^n * (3*n + 1), a(3*n + 2) = (-1)^n * (3*n + 2). a(-n) = a(n). - Michael Somos, Mar 19 2011
G.f.: x(1-x^2)/(1-x+x^2)^2.
a(n) = 2*a(n-1) -3*a(n-2) +2*a(n-3) -a(n-4).
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k,k)*(n-2k)/(n-k).

A091703 Count, setting 5n to zero.

Original entry on oeis.org

0, 1, 2, 3, 4, 0, 6, 7, 8, 9, 0, 11, 12, 13, 14, 0, 16, 17, 18, 19, 0, 21, 22, 23, 24, 0, 26, 27, 28, 29, 0, 31, 32, 33, 34, 0, 36, 37, 38, 39, 0, 41, 42, 43, 44, 0, 46, 47, 48, 49, 0, 51, 52, 53, 54, 0, 56, 57, 58, 59, 0, 61, 62, 63, 64, 0, 66, 67, 68, 69, 0, 71, 72, 73, 74, 0, 76, 77
Offset: 0

Views

Author

Paul Barry, Jan 30 2004

Keywords

Crossrefs

Programs

  • Magma
    [(n mod 5 eq 0) select 0 else n: n in [0..80]]; // G. C. Greubel, Feb 28 2019
    
  • Mathematica
    Table[If[Divisible[n,5],0,n],{n,0,80}] (* Harvey P. Dale, Apr 26 2018 *)
  • PARI
    a(n) = if (n % 5, n, 0); \\ Michel Marcus, Feb 28 2019
    
  • Sage
    [n if not n % 5==0 else 0 for n in range(80)] # G. C. Greubel, Feb 28 2019

Formula

a(n) = Product_{k=0..4} Sum_{j=1..n} e^(2*Pi*ijk/5), i=sqrt(-1).
a(n) = cos(4*Pi*n/5 + 2*Pi/5)*(n*cos(2*Pi*n/5 + Pi/5)/5 + n*sqrt(1/5 - 2*sqrt(5)/25)*sin(2*Pi*n/5 + Pi/5) + n*(1/5 - sqrt(5)/5)) + sin(4*Pi*n/5 + 2*Pi/5)*(n*sqrt(2*sqrt(5)/25 + 1/5)*cos(2*Pi*n/5 + Pi/5) + sqrt(5)*n*sin(2*Pi*n/5 + Pi/5)/5 - n*sqrt(2*sqrt(5)/25 + 2/5)) - n*(sqrt(5)/5 + 1/5)*cos(2*Pi*n/5 + Pi/5) - n*sqrt(2/5 - 2*sqrt(5)/25)*sin(2*Pi*n/5 + Pi/5) + 4*n/5.
a(n) = n^5 mod (5*n). - Paul Barry, Apr 13 2005
Multiplicative with a(5^e) = 0, a(p^e) = p^e otherwise. - Mitch Harris, Jun 09 2005
From R. J. Mathar, Feb 04 2009: (Start)
a(n) = 2*a(n-5) - a(n-10).
G.f.: x*(1 + 2*x + 3*x^2 + 4*x^3 + 4*x^5 + 3*x^6 + 2*x^7 + x^8)/(1-x^5)^2.
a(n) = |A080891(n)|*A001477(n). (End)
From R. J. Mathar, Apr 14 2011: (Start)
a(n) = n*A011558(n).
Dirichlet g.f.: (1-5^(1-s))*zeta(s-1). (End)
Sum_{k=1..n} a(k) ~ (2/5) * n^2. - Amiram Eldar, Nov 20 2022

A162397 a(n) = n * Kronecker(-3, n).

Original entry on oeis.org

1, -2, 0, 4, -5, 0, 7, -8, 0, 10, -11, 0, 13, -14, 0, 16, -17, 0, 19, -20, 0, 22, -23, 0, 25, -26, 0, 28, -29, 0, 31, -32, 0, 34, -35, 0, 37, -38, 0, 40, -41, 0, 43, -44, 0, 46, -47, 0, 49, -50, 0, 52, -53, 0, 55, -56, 0, 58, -59, 0, 61, -62, 0, 64, -65, 0
Offset: 1

Views

Author

Michael Somos, Jul 02 2009

Keywords

Comments

In Gil and Robins 2003 on page 33 the g.f. is denoted by f_{4, 2}(x). - Michael Somos, Sep 04 2015

Examples

			G.f. = x - 2*x^2 + 4*x^4 - 5*x^5 + 7*x^7 - 8*x^8 + 10*x^10 - 11*x^11 + ...
		

References

  • George E. Andrews and Bruce C. Berndt, Ramanujan's lost notebook, Part I, Springer, New York, 2005, MR2135178 (2005m:11001) See p. 319, Equation (14.3.6).

Crossrefs

Programs

  • Mathematica
    Table[n*KroneckerSymbol[-3,n],{n,80}] (* Harvey P. Dale, Mar 14 2015 *)
  • PARI
    {a(n) = n * kronecker(-3, n)};

Formula

Euler transform of length 3 sequence [ -2, -1, 2].
a(n) is completely multiplicative with a(3^e) = 0^e, a(p^e) = p^e if p == 1 (mod 3), a(p^e) = (-p)^e if p == 2 (mod 3).
G.f.: (x - x^3) / (1 + x + x^2)^2.
a(3*n) = 0. a(n) = a(-n). abs(a(n)) = A091684(n). a(n) = n * A102283(n). a(3*n + 1) = A016777(n). a(3*n + 2) = - A016789(n). - Michael Somos, Mar 14 2012
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2/3. - Amiram Eldar, Nov 23 2023
Showing 1-5 of 5 results.