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 31 results. Next

A239313 Triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the odd numbers interleaved with k-1 zeros, except the first column which lists 0 together with the nonnegative integers, and the first element of column k is in row k*(k+1)/2.

Original entry on oeis.org

0, 0, 1, 1, 2, 0, 3, 3, 4, 0, 1, 5, 5, 0, 6, 0, 0, 7, 7, 3, 8, 0, 0, 1, 9, 9, 0, 0, 10, 0, 5, 0, 11, 11, 0, 0, 12, 0, 0, 3, 13, 13, 7, 0, 1, 14, 0, 0, 0, 0, 15, 15, 0, 0, 0, 16, 0, 9, 5, 0, 17, 17, 0, 0, 0, 18, 0, 0, 0, 3, 19, 19, 11, 0, 0, 1, 20, 0, 0, 7, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Mar 15 2014

Keywords

Comments

Alternating row sums give the Chowla's function, i.e., sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A048050(n).
Row n has length A003056(n) hence column k starts in row A000217(k).
Column 1 gives 0 together with A001477.
Column 2 is A193356.
The number of positive terms in row n is A001227(n), if n >= 3. - Omar E. Pol, Apr 18 2016

Examples

			Triangle begins (row n = 1..24):
0;
0;
1,   1;
2,   0;
3,   3;
4,   0,  1;
5,   5,  0;
6,   0,  0;
7,   7,  3;
8,   0,  0,  1;
9,   9,  0,  0;
10,  0,  5,  0;
11, 11,  0,  0;
12,  0,  0,  3;
13, 13,  7,  0,  1;
14,  0,  0,  0,  0;
15, 15,  0,  0,  0;
16,  0,  9,  5,  0;
17, 17,  0,  0,  0;
18,  0,  0,  0,  3;
19, 19, 11,  0,  0,  1;
20,  0,  0,  7,  0,  0;
21, 21,  0,  0,  0,  0;
22,  0, 13,  0,  0,  0;
...
For n = 15 the divisors of 15 are 1, 3, 5, 15 therefore the sum of divisors of 15 except 1 and 15 is 3 + 5 = 8. On the other hand the 15th row of triangle is 13, 13, 7, 0, 1, hence the alternating row sum is 13 - 13 + 7 - 0 + 1 = 8, equalling the sum of divisors of 15 except 1 and 15.
If n is even then the alternating sum of the n-th row of triangle is simpler than the sum of divisors of n, except 1 and n. Example: the sum of divisors of 24 except 1 and 24 is 2 + 3 + 4 + 6 + 8 + 12 = 35, and the alternating sum of the 24th row of triangle is 22 - 0 + 13 - 0 + 0 - 0 = 35.
		

Crossrefs

Formula

T(n,k) = A196020(n,k), if k >= 2. - Omar E. Pol, Apr 18 2016

A255655 The sum of the odd terms in row n of A050873.

Original entry on oeis.org

1, 1, 5, 2, 9, 5, 13, 4, 21, 9, 21, 10, 25, 13, 45, 8, 33, 21, 37, 18, 65, 21, 45, 20, 65, 25, 81, 26, 57, 45, 61, 16, 105, 33, 117, 42, 73, 37, 125, 36, 81, 65, 85, 42, 189, 45, 93, 40, 133, 65, 165, 50, 105, 81, 189, 52, 185, 57, 117, 90
Offset: 1

Views

Author

Geoffrey Critzer, Mar 01 2015

Keywords

Examples

			a(10)=9 because row 10 of A050873 is gcd(10,k) for k=1,2,...10: 1, 2, 1, 2, 5, 2, 1, 2, 1, 10. If we sum the odd terms in this row we have 1+1+5+1+1=9.
		

Crossrefs

Programs

  • Mathematica
    nn = 60; f[list_, i_] := list[[i]]; a =Table[EulerPhi[n], {n, 1, nn}]; b =
    Table[If[OddQ[n], n, 0], {n, 1, nn}]; Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}]
    Table[Sum[(d*(1-(-1)^d)/2)*EulerPhi[n/d], {d, Divisors[n]}], {n, 1, 50}] (* Vaclav Kotesovec, Feb 02 2019 *)
    f[p_, e_] := p^(e-1) * If[p == 2, 1, (p-1)*e + p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 30 2023 *)
  • PARI
    a(n) = sum(k=1, n, my(g = gcd(n, k)); if (g % 2, g, 0)); \\ Michel Marcus, Feb 05 2018

Formula

For odd n, a(n) = A018804(n).
Dirichlet g.f.: zeta(s-1)^2*(1 - 2^(1-s))/zeta(s).
a(n) = Sum_{d|n} A193356(d)*A000010(n/d). - Werner Schulte, Feb 04 2018
Multiplicative with a(2^e)=2^(e-1) for e>0 and a(p^e)=((p-1)*e+p)*p^(e-1) for e>0 and p>2. - Werner Schulte, Feb 04 2018
Sum_{k=1..n} a(k) ~ 3*n^2 / (2*Pi^2) * (log(n) - 1/2 + 2*gamma + log(2) - 6*Zeta'(2)/Pi^2), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 02 2019

A296065 Partial sums of A296064.

Original entry on oeis.org

0, 2, 3, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, 25, 0, 27, 0, 29, 0, 31, 0, 33, 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55
Offset: 1

Views

Author

Enrique Navarrete, Dec 04 2017

Keywords

Comments

Essentially the same as A193356. - R. J. Mathar, Jan 02 2018

Crossrefs

Cf. A296064.

Programs

  • Mathematica
    Accumulate@ Nest[Append[#, Block[{k = 1, s = 1}, While[Nand[FreeQ[#, s k], IntegerQ@ Mean[Append[#, s k]]], If[s == 1, s = -1, k++; s = 1]]; s k]] &, {0}, 54] (* Michael De Vlieger, Dec 12 2017 *)
    LinearRecurrence[{0,2,0,-1},{0,2,3,0,5,0},60] (* or *) Join[{0,2},Riffle[ 2*Range[ 30]+1,0]]  (* Harvey P. Dale, Oct 21 2021 *)

A309324 Expansion of Sum_{k>=1} psi(k) * x^k/(1 + x^k), where psi = Dedekind psi function (A001615).

Original entry on oeis.org

1, 2, 5, 2, 7, 10, 9, 2, 17, 14, 13, 10, 15, 18, 35, 2, 19, 34, 21, 14, 45, 26, 25, 10, 37, 30, 53, 18, 31, 70, 33, 2, 65, 38, 63, 34, 39, 42, 75, 14, 43, 90, 45, 26, 119, 50, 49, 10, 65, 74, 95, 30, 55, 106, 91, 18, 105, 62, 61, 70, 63, 66, 153, 2, 105, 130, 69, 38, 125, 126, 73
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 23 2019

Keywords

Comments

Dirichlet convolution of sum of odd divisors function with characteristic function of squarefree numbers.

Crossrefs

Programs

  • Mathematica
    nmax = 71; CoefficientList[Series[Sum[DirichletConvolve[j, MoebiusMu[j]^2, j, k]  x^k/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[Sum[MoebiusMu[n/d]^2 Plus @@ Select[Divisors@ d, OddQ], {d, Divisors[n]}], {n, 1, 71}]
    f[2, e_] := 2; f[p_, e_] := (p^e*(p+1)-2)/(p-1); a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Dec 01 2020 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] == 2, 2, (f[i,1]^f[i,2]*(f[i,1]+1)-2)/(f[i,1]-1)));} \\ Amiram Eldar, Nov 06 2022

Formula

a(n) = Sum_{d|n} (-1)^(n/d+1) * psi(d).
a(n) = Sum_{d|n} mu(n/d)^2 * A000593(d).
Multiplicative with a(2^e) = 2, and a(p^e) = (p^e*(p+1)-2)/(p-1) for odd primes p. - Amiram Eldar, Dec 01 2020
Sum_{k=1..n} a(k) ~ (5/8) * n^2. - Amiram Eldar, Nov 06 2022

A309338 a(n) = n^4 if n odd, 7*n^4/8 if n even.

Original entry on oeis.org

0, 1, 14, 81, 224, 625, 1134, 2401, 3584, 6561, 8750, 14641, 18144, 28561, 33614, 50625, 57344, 83521, 91854, 130321, 140000, 194481, 204974, 279841, 290304, 390625, 399854, 531441, 537824, 707281, 708750, 923521, 917504, 1185921, 1169294, 1500625, 1469664, 1874161, 1824494
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 24 2019

Keywords

Comments

Moebius transform of A284900.

Crossrefs

Programs

  • Mathematica
    a[n_] := If[OddQ[n], n^4, 7 n^4/8]; Table[a[n], {n, 0, 38}]
    nmax = 38; CoefficientList[Series[x (1 + 14 x + 76 x^2 + 154 x^3 + 230 x^4 + 154 x^5 + 76 x^6 + 14 x^7 + x^8)/(1 - x^2)^5, {x, 0, nmax}], x]
    LinearRecurrence[{0, 5, 0, -10, 0, 10, 0, -5, 0, 1}, {0, 1, 14, 81, 224, 625, 1134, 2401, 3584, 6561}, 39]
    Table[n^4 (15 - (-1)^n)/16, {n, 0, 38}]

Formula

G.f.: x * (1 + 14*x + 76*x^2 + 154*x^3 + 230*x^4 + 154*x^5 + 76*x^6 + 14*x^7 + x^8)/(1 - x^2)^5.
G.f.: Sum_{k>=1} J_4(k) * x^k/(1 + x^k), where J_4() is the Jordan function (A059377).
Dirichlet g.f.: zeta(s-4) * (1 - 2^(1-s)).
a(n) = n^4 * (15 - (-1)^n)/16.
a(n) = Sum_{d|n} (-1)^(n/d + 1) * J_4(d).
Sum_{n>=1} 1/a(n) = 113*Pi^4/10080 = 1.091986834012130496797...
Multiplicative with a(2^e) = 7*2^(4*e-3), and a(p^e) = p^(4*e) for odd primes p. - Amiram Eldar, Oct 26 2020

A327123 Expansion of Sum_{k>=1} phi(k) * x^k / (1 + x^(2*k)), where phi = A000010.

Original entry on oeis.org

1, 1, 1, 2, 5, 1, 5, 4, 5, 5, 9, 2, 13, 5, 5, 8, 17, 5, 17, 10, 5, 9, 21, 4, 25, 13, 13, 10, 29, 5, 29, 16, 9, 17, 25, 10, 37, 17, 13, 20, 41, 5, 41, 18, 25, 21, 45, 8, 37, 25, 17, 26, 53, 13, 45, 20, 17, 29, 57, 10, 61, 29, 25, 32, 65, 9, 65, 34, 21
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 14 2019

Keywords

Comments

Moebius transform of A050469.

Crossrefs

Programs

  • Mathematica
    nmax = 69; CoefficientList[Series[Sum[EulerPhi[k] x^k/(1 + x^(2 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    A050469[n_] := DivisorSum[n, # &, MemberQ[{1}, Mod[n/#, 4]] &] - DivisorSum[n, # &, MemberQ[{3}, Mod[n/#, 4]] &]; a[n_] := DivisorSum[n, MoebiusMu[n/#] A050469[#] &]; Table[a[n], {n, 1, 69}]
    f[p_, e_] := If[Mod[p, 4] == 1, p^e, (p^(e+1) - p^e + 2*(-1)^e)/(p+1)]; f[2, e_] := 2^(e-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 70] (* Amiram Eldar, Aug 28 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, p = f[i,1]; e = f[i,2]; if(p == 2, 2^(e-1), if(p%4 == 1, p^e, (p^(e+1) - p^e + 2*(-1)^e)/(p+1)))); } \\ Amiram Eldar, Aug 28 2023

Formula

a(n) = Sum_{d|n} mu(n/d) * A050469(d).
From Amiram Eldar, Aug 28 2023: (Start)
Multiplicative with a(2^e) = 2^(e-1), and if p is an odd prime a(p^e) = 1 if p == 1 (mod 4) and (p^(e+1) - p^e + 2*(-1)^e)/(p+1) otherwise.
Sum_{k=1..n} a(k) ~ c * n^2, where c = 3*G/Pi^2 = 0.278420154533..., and G is Catalan's constant (A006752). (End)
Conjecture: a(n) = Sum_{k=1..n} sin(GCD(k,n) * Pi/2). - Velin Yanev and Vaclav Kotesovec, Jun 01 2024

A328373 Expansion of Sum_{k>=1} x^(k^2) * (1 + x^(2*k^2)) / (1 - x^(2*k^2))^2.

Original entry on oeis.org

1, 0, 3, 1, 5, 0, 7, 0, 10, 0, 11, 3, 13, 0, 15, 1, 17, 0, 19, 5, 21, 0, 23, 0, 26, 0, 30, 7, 29, 0, 31, 0, 33, 0, 35, 10, 37, 0, 39, 0, 41, 0, 43, 11, 50, 0, 47, 3, 50, 0, 51, 13, 53, 0, 55, 0, 57, 0, 59, 15, 61, 0, 70, 1, 65, 0, 67, 17, 69, 0, 71, 0, 73, 0, 78, 19, 77, 0, 79, 5, 91
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 14 2019

Keywords

Comments

Sum of odd divisors d of n such that n/d is square.

Crossrefs

Cf. A000593, A010052, A035316, A036554 (positions of 0's), A056911 (fixed points), A076752, A193356, A328372.

Programs

  • Magma
    a:=[];for n in [1..81] do  v:=[d:d in Divisors(n)| IsOdd(d) and IsSquare(n div d)]; if #v ne 0  then Append(~a,&+v); else Append(~a,0); end if; end for; a; // Marius A. Burtea, Oct 14 2019
  • Mathematica
    nmax = 81; CoefficientList[Series[Sum[x^(k^2) (1 + x^(2 k^2))/(1 - x^(2 k^2))^2, {k, 1, Floor[Sqrt[nmax]] + 1}], {x, 0, nmax}], x] // Rest
    Table[DivisorSum[n, # &, OddQ[#] && IntegerQ[(n/#)^(1/2)] &], {n, 1, 81}]
    f[p_, e_] := If[p == 2, Boole @ EvenQ[e], If[EvenQ[e], (p^(e + 2) - 1)/(p^2 - 1), (p^(e + 2) - p)/(p^2 - 1)]]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 16 2020 *)
  • PARI
    a(n) = sumdiv(n, d, if ((d%2) && issquare(n/d), d)); \\ Michel Marcus, Oct 14 2019
    

Formula

G.f.: Sum_{k>=1} (2*k - 1) * (theta_3(x^(2*k - 1)) - 1) / 2.
G.f.: Sum_{i>=1} Sum_{j>=1} phi(i) * x^(i*j^2) / (1 + x^(i*j^2)).
Dirichlet g.f.: (1 - 2^(1 - s)) * zeta(s-1) * zeta(2*s).
a(n) = Sum_{d|n} A193356(d) * A010052(n/d).
Sum_{k=1..n} a(k) ~ Pi^4 * n^2 / 360. - Vaclav Kotesovec, Oct 14 2019
Multiplicative with a(2^e) = 0 if e is odd, and 1 if e is even, and for p > 2, a(p^e) = (p^(e + 2) - p)/(p^2 - 1) if e is odd, and (p^(e + 2) - 1)/(p^2 - 1) if e is even. - Amiram Eldar, Oct 16 2020

A289870 a(n) = n*(n + 1) for n odd, otherwise a(n) = (n - 1)*(n + 1).

Original entry on oeis.org

-1, 2, 3, 12, 15, 30, 35, 56, 63, 90, 99, 132, 143, 182, 195, 240, 255, 306, 323, 380, 399, 462, 483, 552, 575, 650, 675, 756, 783, 870, 899, 992, 1023, 1122, 1155, 1260, 1295, 1406, 1443, 1560, 1599, 1722, 1763, 1892, 1935, 2070, 2115, 2256, 2303, 2450, 2499
Offset: 0

Views

Author

Keywords

Comments

a(n) is a fifth-order linear recurrence whose main interest is that it is related to (at least) eight other sequences (see the formula section).

Crossrefs

After -1, subsequence of A035106, A198442 and A214297.

Programs

  • Mathematica
    a[n_] := (n + 1)(n - 1 + Mod[n, 2]); Table[a[n], {n, 0, 50}]
  • PARI
    a(n)=if(n%2, n, n-1)*(n+1) \\ Charles R Greathouse IV, Jul 14 2017

Formula

a(n) = (n + 1)*(n - 1 + (n mod 2)).
a(n) = n * A109613(n-1) for n>0.
a(n) = -A114285(n) * A109613(n).
a(n) = A002378(n) - A193356(n).
a(n) = A289296(-n).
a(n) = n^2 - (-1)^n * A093178(n).
a(2*k) = A000466(k).
G.f.: (1-3*x-3*x^2-3*x^3)/((-1+x)^3*(1+x)^2).

A383641 a(n) is the difference between the sum of even composites and the sum of the odd composites in the first n positive integers.

Original entry on oeis.org

0, 0, 0, 4, 4, 10, 10, 18, 9, 19, 19, 31, 31, 45, 30, 46, 46, 64, 64, 84, 63, 85, 85, 109, 84, 110, 83, 111, 111, 141, 141, 173, 140, 174, 139, 175, 175, 213, 174, 214, 214, 256, 256, 300, 255, 301, 301, 349, 300, 350, 299, 351, 351, 405, 350, 406, 349, 407, 407
Offset: 1

Views

Author

Felix Huber, May 08 2025

Keywords

Examples

			Of the first 9 positive integers, 4, 6, and 8 are even composites and 9 is an odd composite, so a(9) = 4 + 6 + 8 - 9 = 9.
		

Crossrefs

Programs

  • Maple
    A383641:=n->`if`(n=1,0,floor((n-2)/2)-n*(n mod 2)+add(ithprime(i),i=2..NumberTheory:-pi(n)));seq(A383641(n),n=1..59);
  • Mathematica
    lim=59;cn=Select[Range[lim],CompositeQ];a[n_]:=Total[Select[cn,EvenQ[#]&&#<=n&]]-Total[Select[cn,OddQ[#]&&#<=n&]];Array[a,lim] (* James C. McMahon, May 14 2025 *)

Formula

a(n) = floor((n-2)/2) - n*(n mod 2) + Sum_{i=2..pi(n)} prime(i) for n > 1.
a(n) = A004526(n) - A193356(n) - A010701(n) + A034387(A000720(n)) for n > 1.
a(n) = Sum_{i=1..n} ((-1)^i*i*A066247(i)).

A267942 Interleave (n-1)^2 + 2 and (n+1)^2 + 2.

Original entry on oeis.org

3, 3, 2, 6, 3, 11, 6, 18, 11, 27, 18, 38, 27, 51, 38, 66, 51, 83, 66, 102, 83, 123, 102, 146, 123, 171, 146, 198, 171, 227, 198, 258, 227, 291, 258, 326, 291, 363, 326, 402, 363, 443, 402, 486, 443, 531, 486, 578, 531, 627, 578, 678, 627, 731, 678, 786, 731
Offset: 0

Views

Author

Paul Curtz, Jan 22 2016

Keywords

Comments

Trisections:
3, 6, 6, 27, 27, 66, 66, ... = 3*(1, 2, 2, 9, 9, 22, 22, ... ). See A056105.
3, 3, 18, 18, 51, 51, 102, ... = 3*(1, 1, 6, 6, 17, 17, ... ). See A056109.
2, 11, 11, 38, 38, 83, 83, ... (== 2 (mod 9)).
The trisections also have the signature (1,2,-2,-1,1). The corresponding main sequence is 0, 0, 0, 0, 1, 1, 3, 3, ... = A161680(n) with each term duplicated.

Examples

			a(0) = (2+13)/5, a(1) = (13+2)/5, a(2) = (5+5)/5, a(3) = (29+1)/5, ... (using first formula).
		

Crossrefs

Programs

  • Magma
    &cat [[(n-1)^2+2, (n+1)^2+2]: n in [0..50]]; // Vincenzo Librandi, Jan 23 2016
  • Mathematica
    Flatten[Table[{n^2 - 2 n + 3, n^2 + 2 n + 3}, {n, 0, 30}]] (* Vincenzo Librandi, Jan 23 2016 *)
    CoefficientList[Series[(3 - 7 x^2 + 4 x^3 + 2 x^4)/((1 - x)^3 (1 + x)^2), {x, 0, 56}], x] (* Michael De Vlieger, Jan 24 2016 *)
  • PARI
    Vec((3-7*x^2+4*x^3+2*x^4)/((1-x)^3*(1+x)^2) + O(x^100)) \\ Colin Barker, Jan 22 2016
    

Formula

a(n) = (A261327(n+2) + A261327(n-3))/5.
a(n+1) = a(n) + (-1)^n * A022998(n), a(0)=3.
a(n+3) = a(n) + 3*A193356(n), a(0)=a(1)=3, a(2)=2.
a(n) = 3 + A174474(n).
a(2n) + a(2n+1) = A255844(n).
From Colin Barker, Jan 22 2016: (Start)
a(n) = (2*n^2 - 6*(-1)^n*n - 2*n + 3*(-1)^n + 21)/8.
a(n) = (n^2 - 4*n + 12)/4 for n even.
a(n) = (n^2 + 2*n + 9)/4 for n odd.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4.
G.f.: (3 - 7*x^2 + 4*x^3 + 2*x^4) / ((1-x)^3*(1+x)^2).
(End)

Extensions

More terms from Colin Barker, Jan 22 2016
Previous Showing 21-30 of 31 results. Next