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

A363611 Expansion of Sum_{k>0} x^(4*k)/(1-x^k)^4.

Original entry on oeis.org

0, 0, 0, 1, 4, 10, 20, 36, 56, 88, 120, 176, 220, 306, 368, 491, 560, 746, 816, 1058, 1160, 1450, 1540, 1982, 2028, 2520, 2656, 3232, 3276, 4116, 4060, 4986, 5080, 6016, 6008, 7457, 7140, 8586, 8656, 10232, 9880, 12116, 11480, 13792, 13668, 15730, 15180, 18652, 17316, 20536
Offset: 1

Views

Author

Seiichi Manyama, Jun 11 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, Binomial[# - 1, 3] &]; Array[a, 50] (* Amiram Eldar, Jul 25 2023 *)
  • PARI
    my(N=60, x='x+O('x^N)); concat([0, 0, 0], Vec(sum(k=1, N, x^(4*k)/(1-x^k)^4)))
    
  • PARI
    a(n) = my(f = factor(n)); (sigma(f, 3) - 6*sigma(f, 2) + 11*sigma(f) - 6*numdiv(f)) / 6; \\ Amiram Eldar, Jan 01 2025

Formula

G.f.: Sum_{k>0} binomial(k-1,3) * x^k/(1 - x^k).
a(n) = Sum_{d|n} binomial(d-1,3).
From Amiram Eldar, Jan 01 2025: (Start)
a(n) = (sigma_3(n) - 6*sigma_2(n) + 11*sigma_1(n) - 6*sigma_0(n)) / 6.
Dirichlet g.f.: zeta(s) * (zeta(s-3) - 6*zeta(s-2) + 11*zeta(s-1) - 6*zeta(s)) / 6.
Sum_{k=1..n} a(k) ~ (zeta(4)/24) * n^4. (End)

A065061 Numbers k such that sigma(k) - tau(k) is a prime.

Original entry on oeis.org

3, 8, 162, 512, 1250, 8192, 31250, 32768, 41472, 663552, 2531250, 3748322, 5120000, 6837602, 7558272, 8000000, 15780962, 33554432, 35701250, 42762752, 45334242, 68024448, 75031250, 78125000, 91125000, 137149922, 243101250, 512000000, 907039232, 959570432
Offset: 1

Views

Author

Jason Earls, Nov 06 2001

Keywords

Comments

From Kevin P. Thompson, Jun 20 2022: (Start)
Terms greater than 3 must be twice a square (see A064205).
No terms are congruent to 4 or 6 (mod 10) (see A064205).
(End)

Examples

			162 is a term since sigma(162) - tau(162) = 363 - 10 = 353, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ DivisorSigma[1, n] - DivisorSigma[0, n]], Print[n]], {n, 1, 10^7}]
  • PARI
    { n=0; for (m=1, 10^9, if (isprime(sigma(m) - numdiv(m)), write("b065061.txt", n++, " ", m); if (n==100, return)) ) } \\ Harry J. Smith, Oct 05 2009
    
  • Python
    from itertools import count, islice
    from sympy import isprime, divisor_sigma as s, divisor_count as t
    def agen(): # generator of terms
        yield 3
        yield from (k for k in (2*i*i for i in count(1)) if isprime(s(k)-t(k)))
    print(list(islice(agen(), 30))) # Michael S. Branicky, Jun 20 2022

Extensions

a(17)-a(28) from Harry J. Smith, Oct 05 2009
a(29)-a(30) from Kevin P. Thompson, Jun 20 2022

A125182 Triangle read by rows: T(n,k) is the number of permutations p of {1,2,...,n} such that the set {p(i)-i, i=1,2,...,n} has exactly k elements (1<=k<=n).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 4, 12, 7, 1, 4, 38, 54, 23, 1, 8, 77, 248, 303, 83, 1, 6, 160, 824, 2008, 1636, 405, 1, 11, 285, 2320, 9449, 15789, 10352, 2113, 1, 10, 476, 5564, 37237, 102726, 133293, 70916, 12657, 1, 14, 799, 13172, 122708, 536900, 1158368, 1177168, 537373, 82297
Offset: 1

Views

Author

Emeric Deutsch, Nov 24 2006

Keywords

Comments

Row sums are the factorial numbers (A000142). T(n,1)=1 (the identity permutation). T(n,2) = A065608(n) = (sum of divisors of n)-(number of divisors of n). T(n,n) = A099152(n). In the first Maple program define n (<=10) to obtain row n.
T(n,k) is also the number of permutations p of {1,2,...,n} such that the set {p(i) + i, i=1,2,...,n} has exactly k elements (1<=k<=n). Example: T(4,2)=4 because we have 1432, 3412, 2143 and 3214. - Emeric Deutsch, Nov 28 2008

Examples

			T(4,2) = 4 because we have 4123, 3412, 2143 and 2341.
Triangle starts:
  1;
  1, 1;
  1, 2,  3;
  1, 4, 12,  7;
  1, 4, 38, 54, 23;
  ...
		

Crossrefs

Programs

  • Maple
    n:=7: with(combinat): P:=permute(n): for j from 1 to n! do c[j]:=0 od: for j from 1 to n! do if nops({seq(P[j][i]-i,i=1..n)}) = 1 then c[1]:=c[1]+1 elif nops({seq(P[j][i]-i,i=1..n)}) = 2 then c[2]:=c[2]+1 elif nops({seq(P[j][i]-i,i=1..n)}) = 3 then c[3]:=c[3]+1 elif nops({seq(P[j][i]-i,i=1..n)}) = 4 then c[4]:=c[4]+1 elif nops({seq(P[j][i]-i,i=1..n)}) = 5 then c[5]:=c[5]+1 elif nops({seq(P[j][i]-i,i=1..n)}) = 6 then c[6]:=c[6]+1 elif nops({seq(P[j][i]-i,i=1..n)}) = 7 then c[7]:=c[7]+1 elif nops({seq(P[j][i]-i,i=1..n)}) = 8 then c[8]:=c[8]+1 elif nops({seq(P[j][i]-i,i=1..n)}) = 9 then c[9]:=c[9]+1 elif nops({seq(P[j][i]-i,i=1..n)}) = 10 then c[10]:=c[10]+1 else fi od: seq(c[i],i=1..n);
    # second Maple program:
    b:= proc(p, s) option remember; `if`(p={}, x^nops(s),
          add(b(p minus {t}, s union {t+nops(p)}), t=p))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b({$1..n}, {})):
    seq(T(n), n=1..9);  # Alois P. Heinz, May 04 2014; revised, Sep 08 2018
  • Mathematica
    b[i_, p_List, s_List] := b[i, p, s] = If[p == {}, x^Length[s], Sum[b[i+1, p ~Complement~ {t}, s ~Union~ {t+i}], {t, p}]]; T[n_] := Function[{p}, Table[ Coefficient[p, x, i], {i, 1, n}]][b[1, Range[n], {}]]; Table[T[n], {n, 1, 9}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)

Formula

Sum_{k=1..n} k * T(n,k) = A306455(n). - Alois P. Heinz, Feb 16 2019

A229268 Primes of the form sigma(k) - tau(k), where sigma(k) = A000203(k) and tau(k) = A000005(k).

Original entry on oeis.org

2, 11, 353, 1013, 2333, 16369, 58579, 65519, 123733, 1982273, 7089683, 5778653, 12795053, 10500593, 22586027, 19980143, 24126653, 67108837, 72494713, 90781993, 106199593, 203275951, 164118923, 183105421, 320210549, 259997173, 794091653, 1279963973
Offset: 1

Views

Author

Paolo P. Lava, Sep 18 2013

Keywords

Examples

			Second term of A065061 is 8 and sigma(8) - tau(8) = 15 - 4 = 11 is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,n; a:= sigma(n)-tau(n); for n from 1 to q do
    if isprime(a) then print(a); fi; od; end: P(10^6);
  • Mathematica
    Join[{2}, Select[(DivisorSigma[1, #] - DivisorSigma[0, #]) & /@ (2*Range[20000]^2), PrimeQ]] (* Amiram Eldar, Dec 06 2022 *)

Formula

a(n) = A000203(A065061(n)) - A000005(A065061(n)). - Michel Marcus, Sep 21 2013
a(n) = A065608(A065061(n)). - Amiram Eldar, Dec 06 2022

Extensions

More terms from Michel Marcus, Sep 21 2013

A263730 Irregular triangle read by rows in which row n > 1 lists k such that (k^2 + k*n)/(k + 1) is an integer.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Oct 25 2015

Keywords

Comments

Minimal value of k is 0 and maximal value of k is n - 2 for n-th row.
Length of rows gives A000005.
Sum of rows gives A065608.

Examples

			  n\k| 0   1   2   3   4   5   6   7   8   9  10
  ---+------------------------------------------
   0 | 0
   1 | 0   1   2   3   4   5   6   7   8   9  10
   2 | 0
   3 | 0   1
   4 | 0   2
   5 | 0   1   3
   6 | 0   4
   7 | 0   1   2   5
   8 | 0   6
   9 | 0   1   3   7
  10 | 0   2   8
  11 | 0   1   4   9
  12 | 0  10
  13 | 0   1   2   3   5  11
		

Crossrefs

Programs

  • Mathematica
    Table[Select[Range[0,n-2],Divisible[#^2+n #,#+1]&],{n,30}]//Flatten (* Harvey P. Dale, Dec 27 2016 *)
  • PARI
    tabf(nn) = {for (n=2, nn, for (k=0, n, if (!((k^2 + k*n) % (k+1)), print1(k, ", "));); print(););} \\ Michel Marcus, Oct 25 2015

Formula

a(n) = A027750(n) - 1.

A077478 Rectangular array R read by antidiagonals: R(i,j) is the number of integers k that divide both i and j (i >= 1, j >= 1).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Nov 08 2002

Keywords

Comments

Antidiagonal sums of R, alias row sums of T, are essentially A065608. Diagonal elements of R comprise A000203 (sums of divisors of n).
Antidiagonals of an array formed by A051731 * A051731 (transposed). - Gary W. Adamson, Nov 12 2007
If R(n) is the n X n Redheffer matrix (A143104) and Rt(n) is its transposed matrix, then this sequence seems to be formed by R(n)*Rt(n). - Enrique Pérez Herrero, Feb 21 2012

Examples

			First few rows of the array R are:
  1, 1, 1, 1, 1, 1, 1, ...
  1, 2, 1, 2, 1, 2, 1, ...
  1, 1, 2, 1, 1, 2, 1, ...
  1, 2, 1, 3, 1, 2, 1, ...
  1, 1, 1, 1, 2, 1, 1, ...
  1, 2, 2, 2, 1, 4, 1, ...
  ...
First few rows of the triangle T are:
  1;
  1, 1;
  1, 2, 1;
  1, 1, 1, 1;
  1, 2, 2, 2, 1;
  1, 1, 1, 1, 1, 1;
  1, 2, 1, 3, 1, 3, 1;
  1, 1, 2, 1, 1, 2, 1, 1;
  1, 2, 1, 2, 2, 2, 1, 2, 1;
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  1, 2, 2, 3, 1, 4, 1, 3, 2, 2, 1;
  ...
R(4,2)=2 since 1|2, 1|4 and 2|2, 2|4.
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=DivisorSigma[0,GCD[n,k]]; Flatten[Table[T[n-k+1,k],{n,14},{k,n}]] (* Stefano Spezia, May 23 2021 *)

Formula

R=U*V, where U and V are the summatory matrices (A077049, A077051). The triangle T(n, k) formed by antidiagonals: T(n, k)=tau(gcd(k, n+1-k)) for 1<=k<=n, where tau(m)=A000005(m). [Corrected by Leroy Quet, Apr 08 2009]
Dirichlet g.f.: Sum_{n>=1} Sum_{k>=1} tau(gcd(n,k))/n^s/k^c = zeta(s)*zeta(c)* zeta(s + c). - Mats Granvik, May 19 2021

Extensions

Edited by N. J. A. Sloane, Jan 11 2009

A191822 Number of solutions to the Diophantine equation x1*x2 + x2*x3 + x3*x4 + x4*x5 = n, with all xi >= 1.

Original entry on oeis.org

0, 0, 0, 1, 2, 6, 8, 16, 20, 32, 36, 58, 58, 86, 92, 125, 122, 178, 164, 228, 224, 286, 268, 382, 330, 436, 424, 534, 474, 660, 556, 740, 692, 840, 752, 1043, 846, 1094, 1032, 1276, 1078, 1476, 1204, 1582, 1458, 1710, 1480, 2070, 1628, 2096, 1924, 2332, 1946, 2652, 2148, 2770, 2480, 2908, 2480, 3512
Offset: 1

Views

Author

N. J. A. Sloane, Jun 17 2011

Keywords

Comments

Related to "Liouville's Last Theorem".

Examples

			G.f.: x^4 + 2 x^5 + 6 x^6 + 8 x^7 + 16 x^8 + 20 x^9 + 32 x^10 + ...
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    D00:=n->add(tau(j)*tau(n-j),j=1..n-1);
    L4:=n->sigma[2](n)-n*sigma[0](n)-D00(n);
    [seq(L4(n),n=1..60)];
  • Mathematica
    a[ n_] := Length @ FindInstance[{x1 > 0, x2 > 0, x3 > 0, x4 > 0, x5 > 0, n == x1 x2 + x2 x3 + x3 x4 + x4 x5}, {x1, x2, x3, x4, x5}, Integers, 10^9]; (* Michael Somos, Nov 12 2016 *)

Formula

a(n) = sigma_2(n) - n*sigma_0(n) - A055507(n-1).

A342343 Number of strict compositions of n with alternating parts strictly decreasing.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 8, 10, 13, 18, 27, 32, 44, 55, 73, 97, 121, 151, 194, 240, 299, 384, 465, 576, 706, 869, 1051, 1293, 1572, 1896, 2290, 2761, 3302, 3973, 4732, 5645, 6759, 7995, 9477, 11218, 13258, 15597, 18393, 21565, 25319, 29703, 34701, 40478, 47278, 54985
Offset: 0

Views

Author

Gus Wiseman, Apr 01 2021

Keywords

Comments

These are finite odd-length sequences q of distinct positive integers summing to n such that q(i) > q(i+2) for all possible i.

Examples

			The a(1) = 1 through a(8) = 13 compositions:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)      (8)
            (1,2)  (1,3)  (1,4)  (1,5)    (1,6)    (1,7)
            (2,1)  (3,1)  (2,3)  (2,4)    (2,5)    (2,6)
                          (3,2)  (4,2)    (3,4)    (3,5)
                          (4,1)  (5,1)    (4,3)    (5,3)
                                 (2,3,1)  (5,2)    (6,2)
                                 (3,1,2)  (6,1)    (7,1)
                                 (3,2,1)  (2,4,1)  (2,5,1)
                                          (4,1,2)  (3,4,1)
                                          (4,2,1)  (4,1,3)
                                                   (4,3,1)
                                                   (5,1,2)
                                                   (5,2,1)
		

Crossrefs

The non-strict case is A000041 (see A342528 for a bijective proof).
The non-strict odd-length case is A001522.
Strict compositions in general are counted by A032020
The non-strict even-length case is A064428.
The case of reversed partitions is A065033.
A000726 counts partitions with alternating parts unequal.
A003242 counts anti-run compositions.
A027193 counts odd-length compositions.
A034008 counts even-length compositions.
A064391 counts partitions by crank.
A064410 counts partitions of crank 0.
A224958 counts compositions with alternating parts unequal.
A257989 gives the crank of the partition with Heinz number n.
A325548 counts compositions with strictly decreasing differences.
A342194 counts strict compositions with equal differences.
A342527 counts compositions with alternating parts equal.

Programs

  • Mathematica
    ici[q_]:=And@@Table[q[[i]]>q[[i+2]],{i,Length[q]-2}];
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&],ici]],{n,0,15}]
  • PARI
    seq(n)={my(p=prod(k=1, n, 1 + y*x^k + O(x*x^n))); Vec(sum(k=0, n, binomial(k, k\2) * polcoef(p,k,y)))} \\ Andrew Howroyd, Apr 16 2021

Formula

G.f.: Sum_{k>=0} binomial(k,floor(k/2)) * [y^k](Product_{j>=1} 1 + y*x^j). - Andrew Howroyd, Apr 16 2021

A348915 a(n) = Sum_{d|n} d^(d mod 2).

Original entry on oeis.org

1, 2, 4, 3, 6, 6, 8, 4, 13, 8, 12, 8, 14, 10, 24, 5, 18, 16, 20, 10, 32, 14, 24, 10, 31, 16, 40, 12, 30, 28, 32, 6, 48, 20, 48, 19, 38, 22, 56, 12, 42, 36, 44, 16, 78, 26, 48, 12, 57, 34, 72, 18, 54, 44, 72, 14, 80, 32, 60, 32, 62, 34, 104, 7, 84, 52, 68, 22, 96, 52, 72, 22, 74
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 03 2021

Keywords

Comments

For each divisor d of n, add d if d is odd, otherwise add 1.
Inverse Möbius transform of n^(n mod 2). - Wesley Ivan Hurt, Mar 31 2025

Examples

			For n = 12, the divisors of 12 are 1, 2, 3, 4, 6, 12 with corresponding summands 1, 1, 3, 1, 1, 1, respectively. The sum is then a(12) = 1 + 1 + 3 + 1 + 1 + 1 = 8.
		

Crossrefs

Cf. A000005 (tau), A000203 (sigma), A000593, A065608, A183063.

Programs

  • Maple
    f:= proc(n) local d;
      add(d^(d mod 2), d = numtheory:-divisors(n))
    end proc;
    map(f, [$1..100]); # Robert Israel, Jun 01 2025
  • Mathematica
    a[n_] := DivisorSum[n, #^Mod[#, 2] &]; Array[a, 100] (* Amiram Eldar, Nov 04 2021 *)
  • PARI
    a(n) = sumdiv(n, d, if (d%2, d, 1)); \\ Michel Marcus, Nov 04 2021
    
  • Python
    from math import prod
    from sympy import factorint
    def A348915(n):
        f = factorint(n>>(m:=(~n&n-1).bit_length())).items()
        d = prod(e+1 for p,e in f)
        s = prod((p**(e+1)-1)//(p-1) for p, e in f)
        return s+d*m # Chai Wah Wu, Jul 16 2022

Formula

a(n) = A000593(n) + A183063(n).
a(n) = A065608(2n) - 2*A065608(n).
a(p) = p+1 for odd primes p. - Wesley Ivan Hurt, Nov 28 2021
a(n) = A000203(A000265(n))+A000005(A000265(n))*A007814(n). - Chai Wah Wu, Jul 16 2022
a(n) = A000203(n) if n is odd. - Robert Israel, Jun 01 2025

A184396 a(n) = number of numbers k <= sigma(n) such that k is not equal to sigma(d) for any divisor d of n, where sigma = A000203.

Original entry on oeis.org

0, 1, 2, 4, 4, 8, 6, 11, 10, 14, 10, 22, 12, 20, 20, 26, 16, 33, 18, 36, 28, 32, 22, 52, 28, 38, 36, 50, 28, 64, 30, 57, 44, 50, 44, 82, 36, 56, 52, 82, 40, 88, 42, 78, 72, 68, 46, 114, 54, 87, 68, 92, 52, 112, 68, 112, 76, 86, 58, 156, 60, 92, 98, 120, 80, 137, 66, 120, 92, 136, 70, 183, 72, 110, 118, 134, 92, 160, 78, 176, 116
Offset: 1

Views

Author

Jaroslav Krizek, Jan 12 2011

Keywords

Comments

Sequence is not the same as A065608(n): a(66) = 137, A065608(66) = 136.

Examples

			For n = 4, sigma(4) = 7, from numbers 1 - 7 there are four numbers k such that k is not equal to sigma(d) for any divisor d of n: 2, 4, 5, 6; a(4) = 4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, k = 1, lmt = DivisorSigma[1, n] + 1, sd = DivisorSigma[1, #] & /@ Divisors@ n}, While[k < lmt, If[! MemberQ[sd, k], c++]; k++]; c]; Array[f, 67]
  • PARI
    A184395(n) = length(vecsort(apply(d->sigma(d),divisors(n)), , 8));
    A184396(n) = (sigma(n) - A184395(n)); \\ Antti Karttunen, Aug 24 2017

Formula

a(n) = A000203(n) - A184395(n).

Extensions

More terms from Antti Karttunen, Aug 24 2017
Previous Showing 21-30 of 41 results. Next