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

A341466 Number of partitions of n into 7 distinct nonprime parts.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 4, 3, 6, 6, 9, 9, 14, 15, 21, 23, 30, 33, 43, 47, 61, 67, 81, 91, 112, 123, 150, 165, 194, 217, 255, 281, 330, 363, 417, 461, 529, 582, 665, 730, 823, 905, 1018, 1115, 1253, 1368, 1519, 1662, 1844, 2010, 2227, 2419, 2659, 2894, 3175, 3442
Offset: 50

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0,
          `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(isprime(i), 0, b(n-i, min(n-i, i-1), t-1))))
        end:
    a:= n-> b(n$2, 7):
    seq(a(n), n=50..105);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0,
         If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
         If[PrimeQ[i], 0, b[n - i, Min[n - i, i - 1], t - 1], 0]]];
    a[n_] := b[n, n, 7];
    Table[a[n], {n, 50, 105}] (* Jean-François Alcover, Feb 23 2022, after Alois P. Heinz *)

A341467 Number of partitions of n into 8 distinct nonprime parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 5, 6, 7, 10, 12, 16, 19, 24, 28, 36, 41, 52, 60, 73, 85, 102, 116, 142, 161, 192, 217, 256, 287, 339, 382, 442, 496, 574, 639, 737, 821, 937, 1041, 1184, 1309, 1483, 1640, 1845, 2037, 2283, 2508, 2807, 3081, 3430, 3761, 4170, 4553, 5045
Offset: 64

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0,
          `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(isprime(i), 0, b(n-i, min(n-i, i-1), t-1))))
        end:
    a:= n-> b(n$2, 8):
    seq(a(n), n=64..118);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0,
         If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
         If[PrimeQ[i], 0, b[n - i, Min[n - i, i - 1], t - 1], 0]]];
    a[n_] := b[n, n, 8];
    Table[a[n], {n, 64, 118}] (* Jean-François Alcover, Feb 22 2022, after Alois P. Heinz *)

A341480 Number of ways to write n as an ordered sum of 3 nonprime numbers.

Original entry on oeis.org

1, 0, 0, 3, 0, 3, 3, 3, 9, 4, 9, 12, 12, 15, 21, 19, 27, 30, 30, 39, 42, 46, 54, 60, 61, 75, 72, 91, 90, 108, 99, 129, 123, 142, 147, 168, 156, 201, 180, 217, 213, 246, 235, 279, 255, 304, 297, 336, 327, 375, 342, 412, 390, 447, 423, 492, 453, 529, 507, 573, 538, 630, 579
Offset: 3

Views

Author

Ilya Gutkovskiy, Feb 13 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(isprime(j), 0, b(n-j, t-1)), j=1..n)))
        end:
    a:= n-> b(n, 3):
    seq(a(n), n=3..65);  # Alois P. Heinz, Feb 13 2021
  • Mathematica
    nmax = 65; CoefficientList[Series[Sum[Boole[!PrimeQ[k]] x^k, {k, 1, nmax}]^3, {x, 0, nmax}], x] // Drop[#, 3] &

Formula

G.f. g(x)^3 where g(x) is the G.f. of A005171.

A341481 Number of ways to write n as an ordered sum of 4 nonprime numbers.

Original entry on oeis.org

1, 0, 0, 4, 0, 4, 6, 4, 16, 8, 18, 28, 25, 40, 50, 56, 76, 92, 98, 136, 147, 176, 212, 240, 272, 328, 352, 420, 471, 524, 592, 668, 747, 808, 938, 996, 1127, 1232, 1354, 1456, 1658, 1720, 1966, 2052, 2279, 2408, 2700, 2772, 3144, 3232, 3568, 3740, 4117, 4228, 4722
Offset: 4

Views

Author

Ilya Gutkovskiy, Feb 13 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(isprime(j), 0, b(n-j, t-1)), j=1..n)))
        end:
    a:= n-> b(n, 4):
    seq(a(n), n=4..58);  # Alois P. Heinz, Feb 13 2021
  • Mathematica
    nmax = 58; CoefficientList[Series[Sum[Boole[!PrimeQ[k]] x^k, {k, 1, nmax}]^4, {x, 0, nmax}], x] // Drop[#, 4] &

Formula

G.f. g(x)^4, where g(x) is the G.f. of A005171.

A005451 a(n) = 1 if n is a prime number, otherwise a(n) = n.

Original entry on oeis.org

1, 1, 1, 4, 1, 6, 1, 8, 9, 10, 1, 12, 1, 14, 15, 16, 1, 18, 1, 20, 21, 22, 1, 24, 25, 26, 27, 28, 1, 30, 1, 32, 33, 34, 35, 36, 1, 38, 39, 40, 1, 42, 1, 44, 45, 46, 1, 48, 49, 50, 51, 52, 1, 54, 55, 56, 57, 58, 1, 60
Offset: 1

Views

Author

Keywords

Comments

Denominator of (1 + Gamma(n))/n.
Möbius transform of A380441(n). - Wesley Ivan Hurt, Jun 21 2025

References

  • Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106.

Crossrefs

Cf. A005171, A005450 (numerators).

Programs

  • Magma
    [IsPrime(n) select 1 else n: n in [1..70]]; // Vincenzo Librandi, Feb 22 2013
    
  • Magma
    [Denominator((1 + Factorial(n-1))/n): n in [1..70]]; // G. C. Greubel, Nov 22 2022
    
  • Maple
    seq(denom((1 + (n-1)!)/n), n=1..80); # G. C. Greubel, Nov 22 2022
  • Mathematica
    Table[If[PrimeQ[n], 1, n], {n, 70}] (* Vincenzo Librandi, Feb 22 2013 *)
    a[n_] := ((n-1)! + 1)/n - Floor[(n-1)!/n] // Denominator; Table[a[n] , {n, 70}] (* Jean-François Alcover, Jul 17 2013, after Minac's formula *)
    Table[Denominator[(1 + Gamma[n])/n], {n,2,70}] (* G. C. Greubel, Nov 22 2022 *)
  • Sage
    def A005451(n):
        if n == 4: return n
        f = factorial(n-1)
        return 1/((f + 1)/n - f//n)
    [A005451(n) for n in (1..71)]   # Peter Luschny, Oct 16 2013
    
  • SageMath
    [denominator((1+gamma(n))/n) for n in range(1,71)] # G. C. Greubel, Nov 22 2022

Formula

Define b(n) = ( (n-1)*(n^2-3*n+1)*b(n-1) - (n-2)^3*b(n-2) )/(n*(n-3)); b(2) = b(3) = 1; a(n) = denominator(b(n)).
a(n) = A088140(n), n >= 3. - R. J. Mathar, Oct 28 2008
a(n) = gcd(n, (n!*n!!)/n^2). - Lechoslaw Ratajczak, Mar 09 2019
From Wesley Ivan Hurt, Jun 21 2025: (Start)
a(n) = n^c(n), where c = A005171.
a(n) = Sum_{d|n} A380441(d) * mu(n/d). (End)

Extensions

Name edited and a(1)=1 prepended by G. C. Greubel, Nov 22 2022. Name further edited by N. J. A. Sloane, Nov 22 2022

A087624 a(n)=0 if n is prime, A001221(n) otherwise.

Original entry on oeis.org

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

Views

Author

Michele Dondi (bik.mido(AT)tiscalinet.it), Sep 14 2003

Keywords

Comments

Number of prime divisors of n, but excluding n itself if n is prime.
Number of non-associated primes in the ring Z_n.
Also for n > 1 the number of times n is crossed off in the sieve of Eratosthenes (A000040). - Reinhard Zumkeller, Oct 17 2008
Number of primes that are proper divisors of n. - Omar E. Pol, Dec 27 2008

Crossrefs

A144489 gives partial sums.

Programs

  • Haskell
    a087624 n = if a010051 n == 1 then 0 else a001221 n
    -- Reinhard Zumkeller, Apr 05 2013
    
  • Maple
    with(numtheory); f:=proc(n) if isprime(n) then nops(factorset(n))-1 else nops(factorset(n)) fi; end;
  • Mathematica
    Array[If[PrimeQ[#],0,PrimeNu[#]]&,110] (* Harvey P. Dale, Mar 27 2013 *)
  • PARI
    a(n) = if (isprime(n), 0, omega(n)); \\ Michel Marcus, Nov 06 2022

Formula

a(n) = A001221(n) * A005171(n). - Jason Kimberley, Nov 19 2014
G.f.: Sum_{k>=1} x^(2*prime(k)) / (1 - x^prime(k)). - Ilya Gutkovskiy, Apr 13 2021
a(n) = omega(n) - c(n), where c = A010051. - Wesley Ivan Hurt, Jun 23 2024

Extensions

Edited by N. J. A. Sloane, Dec 11 2008

A341482 Number of ways to write n as an ordered sum of 5 nonprime numbers.

Original entry on oeis.org

1, 0, 0, 5, 0, 5, 10, 5, 25, 15, 30, 55, 45, 85, 105, 126, 180, 220, 260, 360, 415, 510, 650, 745, 915, 1101, 1270, 1525, 1800, 2045, 2440, 2780, 3225, 3660, 4250, 4771, 5465, 6185, 6930, 7840, 8816, 9790, 11015, 12240, 13505, 15146, 16595, 18385, 20240, 22325, 24255
Offset: 5

Views

Author

Ilya Gutkovskiy, Feb 13 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(isprime(j), 0, b(n-j, t-1)), j=1..n)))
        end:
    a:= n-> b(n, 5):
    seq(a(n), n=5..55);  # Alois P. Heinz, Feb 13 2021
  • Mathematica
    nmax = 55; CoefficientList[Series[Sum[Boole[!PrimeQ[k]] x^k, {k, 1, nmax}]^5, {x, 0, nmax}], x] // Drop[#, 5] &

A341483 Number of ways to write n as an ordered sum of 6 nonprime numbers.

Original entry on oeis.org

1, 0, 0, 6, 0, 6, 15, 6, 36, 26, 45, 96, 75, 156, 201, 242, 375, 456, 586, 816, 987, 1256, 1656, 1962, 2512, 3102, 3717, 4616, 5577, 6612, 8067, 9516, 11283, 13372, 15678, 18378, 21412, 24966, 28719, 33388, 38244, 43872, 50248, 57288, 64914, 74074, 83328, 94248
Offset: 6

Views

Author

Ilya Gutkovskiy, Feb 13 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(isprime(j), 0, b(n-j, t-1)), j=1..n)))
        end:
    a:= n-> b(n, 6):
    seq(a(n), n=6..53);  # Alois P. Heinz, Feb 13 2021
  • Mathematica
    nmax = 53; CoefficientList[Series[Sum[Boole[!PrimeQ[k]] x^k, {k, 1, nmax}]^6, {x, 0, nmax}], x] // Drop[#, 6] &

A141100 Number of unordered pairs of odd composite numbers that sum to 2n.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Jun 02 2008, Jun 05 2008

Keywords

Comments

See A141099 for pairs of odd nonprime numbers. We have a(n) > 0 except for the 14 values of 2n given in A118081.

Examples

			a(18)=2 because 36 = 9+27 = 15+21.
		

Crossrefs

Programs

  • Mathematica
    Table[cnt=0; Do[If[ !PrimeQ[i] && !PrimeQ[2n-i], cnt++ ], {i,3,n,2}]; cnt, {n,100}]

Formula

a(n) = 1 - floor(n/2) + Sum_{i=3..n} c(i) * c(2n-i), n>1, where c = A005171. - Wesley Ivan Hurt, Dec 27 2013

A275647 Decimal expansion of Pi^2/6 - Sum_{k>=1} 1/prime(k)^2.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Aug 04 2016

Keywords

Comments

Decimal expansion of sum of squares of reciprocals of nonprime numbers.
Decimal expansion of the nonprime zeta function at 2.
Continued fraction [1; 5, 5, 3, 1, 2, 2, 6, 2, 2, 4, 1, 1, 93, 2, 1, 1, 5, 3, 5, 3, 2, 1, 2, 6, 1, 4, 5, 1, 34, 1, ...]
More generally, the nonprime zeta function at s equals Sum_{k>=1} (1/k^s - 1/prime(k)^s) = Product_{k>=1} 1/(1 - prime(k)^(-s)) - Sum_{k>=1} 1/prime(k)^s.
Floor(1/(zeta(s)-prime zeta(s)-1)) gives second term in continued fraction for nonprime zeta(s): 5, 36, 187, 852, 3663, 15280, 62692, 254760, 1029279, 4143617, ...
Dirichlet g.f. of A005171: nonprime zeta(s).

Examples

			1/1^2 + 1/4^2 + 1/6^2 + 1/8^2 + 1/9^2 + 1/10^2 + ... = 1.192686646807160937965871801813777255045718557966906015999...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Pi^2/6 - PrimeZetaP[2], 10, 120][[1]]
    RealDigits[Zeta[2] - PrimeZetaP[2], 10, 120][[1]]
  • PARI
    eps()=2.>>bitprecision(1.)
    primezeta(s)=my(lm=s*log(2)); lm=lambertw(lm/eps())\lm; sum(k=1,lm, moebius(k)*log(abs(zeta(k*s)))/k)
    zeta(2) - primezeta(2) \\ Charles R Greathouse IV, Aug 05 2016
    
  • PARI
    Pi^2/6 - sumeulerrat(1/p, 2) \\ Amiram Eldar, Mar 19 2021

Formula

Equals zeta(2) - prime zeta(2) = A013661 - A085548.
Equals Sum_{k>=1} (1 - k*mu(k)*log(zeta(2*k)))/k^2, where mu(k) is the Moebius function (A008683).
Equals Sum_{k>=1} 1/A062312(k).
Equals Sum_{k>=1} 1/A018252(k)^2.
Equals 1 + Sum_{k>=1} 1/A002808(k)^2.
Equals A222171 + A111003 - A085548.
Previous Showing 31-40 of 86 results. Next