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

A237589 Sum of first n odd noncomposite numbers.

Original entry on oeis.org

1, 4, 9, 16, 27, 40, 57, 76, 99, 128, 159, 196, 237, 280, 327, 380, 439, 500, 567, 638, 711, 790, 873, 962, 1059, 1160, 1263, 1370, 1479, 1592, 1719, 1850, 1987, 2126, 2275, 2426, 2583, 2746, 2913, 3086, 3265, 3446, 3637, 3830, 4027, 4226, 4437, 4660, 4887
Offset: 1

Views

Author

Omar E. Pol, Feb 21 2014

Keywords

Comments

Partial sums of A006005.

Examples

			For n = 5 the first five odd noncomposite numbers are 1, 3, 5, 7, 11, so a(5) = 1 + 3 + 5 + 7 + 11 = 27.
		

Crossrefs

Programs

  • Maple
    a := proc(n) option remember; `if`(n=1, 1, a(n-1) + ithprime(n)) end:
    seq(a(n), n=1..49); # Peter Luschny, Sep 20 2018
  • Mathematica
    a[1]=1; a[n_]:=a[n]=a[n-1]+Prime[n]; Table[a[n], {n,1,49}] (* Robert P. P. McKone, Jan 18 2022 *)
  • PARI
    terms(n) = my(s=1, i=0); forprime(p=3, , if(i >= n, break, print1(s, ", "); i++; s=s+p))
    /* Print initial 50 terms as follows */
    terms(50) \\ Felix Fröhlich, Sep 20 2018

Formula

a(n) = A007504(n) - 1 = A014284(n+1) - 2.

A327249 Expansion of Sum_{k>=1} x^k * (1 + k * x^k)^k.

Original entry on oeis.org

1, 2, 1, 5, 1, 14, 1, 17, 28, 26, 1, 160, 1, 50, 251, 321, 1, 622, 1, 1607, 1030, 122, 1, 6257, 3126, 170, 2917, 12202, 1, 27291, 1, 28929, 6656, 290, 84036, 117721, 1, 362, 13183, 407121, 1, 417881, 1, 220100, 850312, 530, 1, 2246465, 823544, 2100626
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 15 2019

Keywords

Crossrefs

Cf. A006005 (positions of 1's), A087909, A217668, A260180, A327238.

Programs

  • Magma
    [&+[(n div d)^(d-1)*Binomial(n div d,d-1):d in Divisors(n)]:n in [1..50]]; // Marius A. Burtea, Sep 15 2019
    
  • Mathematica
    nmax = 50; CoefficientList[Series[Sum[x^k (1 + k x^k)^k, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[DivisorSum[n, (n/#)^(# - 1) Binomial[n/#, # - 1] &], {n, 1, 50}]
  • PARI
    a(n) = sumdiv(n, d, (n/d)^(d-1) * binomial(n/d,d-1)); \\ Michel Marcus, Sep 15 2019

Formula

a(n) = Sum_{d|n} (n/d)^(d-1) * binomial(n/d,d-1).

A348515 a(n) = Sum_{d|n, d <= sqrt(n)} (-1)^(n/d + 1).

Original entry on oeis.org

1, -1, 1, -2, 1, 0, 1, -2, 2, 0, 1, -3, 1, 0, 2, -3, 1, -1, 1, -1, 2, 0, 1, -4, 2, 0, 2, -1, 1, -2, 1, -3, 2, 0, 2, -3, 1, 0, 2, -4, 1, 0, 1, -1, 3, 0, 1, -5, 2, -1, 2, -1, 1, 0, 2, -4, 2, 0, 1, -4, 1, 0, 3, -4, 2, 0, 1, -1, 2, -2, 1, -4, 1, 0, 3, -1, 2, 0, 1, -5
Offset: 1

Views

Author

Ilya Gutkovskiy, Nov 04 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, (-1)^(n/# + 1) &, # <= Sqrt[n] &], {n, 1, 80}]
    nmax = 80; CoefficientList[Series[Sum[(-1)^(k + 1) x^(k^2)/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
  • PARI
    A348515(n) = sumdiv(n,d,if((d*d)<=n,(-1)^(1 + (n/d)),0)); \\ Antti Karttunen, Nov 05 2021
    
  • Python
    from sympy import divisors
    def a(n): return sum((-1)**(n//d + 1) for d in divisors(n) if d*d <= n)
    print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Nov 22 2021

Formula

G.f.: Sum_{k>=1} (-1)^(k + 1) * x^(k^2) / (1 + x^k).
a(n) = 1 iff n = 1 or n is an odd prime (A006005). - Bernard Schott, Nov 22 2021
a(n) = A258998(n) - A348951(n). - Ridouane Oudra, Aug 21 2025

A353605 Product_{n>=1} (1 + a(n)*x^n) = 1 + Sum_{n>=1} prime(n+1)*x^n.

Original entry on oeis.org

3, 5, -8, 35, -52, 118, -320, 1597, -2016, 6616, -16064, 40516, -122552, 381606, -903176, 4389807, -7597004, 22835416, -61172890, 188526110, -486889660, 1550995910, -4093173788, 11608277912, -33815484714, 105179650108, -279683446078, 883705997682, -2366564864546
Offset: 1

Views

Author

Ilya Gutkovskiy, May 07 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 29; f[x_] := Product[(1 + a[n] x^n), {n, 1, nn}]; sol = SolveAlways[0 == Series[f[x] - 1 - Sum[Prime[k + 1] x^k, {k, 1, nn}], {x, 0, nn}], x]; Table[a[n], {n, 1, nn}] /. sol // Flatten

A384232 Smallest number whose largest odd noncomposite divisor is its n-th divisor.

Original entry on oeis.org

1, 3, 6, 20, 42, 84, 156, 312, 684, 1020, 1380, 1860, 3480, 3720, 4920, 7320, 10980, 14640, 16920, 21960, 26280, 34920, 45720, 59640, 69840, 89880, 106680, 125160, 145320, 177240, 213360, 244440, 269640, 354480, 320040, 375480, 435960, 456120, 531720, 647640, 708120
Offset: 1

Views

Author

Omar E. Pol, May 23 2025

Keywords

Comments

This coincide with A087134 except for the second term because here a(2) = 3 and there A087134(2) = 2.

Examples

			The divisors of 42 are [1, 2, 3, 6, 7, 14, 21, 42] and the largest odd noncomposite divisor is 7 and 7 is its 5th divisor, so a(5) = 42 because 42 the smallest number having that property.
		

Crossrefs

Row 1 of A384233.
Companion of A383402.

Programs

  • Mathematica
    With[{t = Table[FirstPosition[Divisors[n], FactorInteger[n/2^IntegerExponent[n, 2]][[-1, 1]]][[1]], {n, 1, 10^6}]}, TakeWhile[FirstPosition[t, #] & /@ Range[Max[t]] // Flatten, ! MissingQ[#] &]] (* Amiram Eldar, May 23 2025 *)

A384233 Square array read by upward antidiagonals: T(n,k) is the n-th number whose largest odd noncomposite divisor is its k-th divisor, n >= 1, k >= 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 7, 10, 20, 16, 9, 12, 28, 42, 32, 11, 14, 30, 60, 84, 64, 13, 15, 40, 66, 132, 156, 128, 17, 18, 44, 78, 168, 204, 312, 256, 19, 21, 52, 88, 198, 228, 408, 684, 512, 23, 22, 56, 102, 210, 264, 456, 696, 1020, 1024, 25, 24, 68, 104, 220, 276, 468, 744, 1140, 1380
Offset: 1

Views

Author

Omar E. Pol, May 22 2025

Keywords

Comments

This is a permutation of the positive integers.

Examples

			The corner 15 X 15 of the square array is as follows:
      1,  3,  6,  20,  42,  84, 156, 312,  684, 1020, 1380, 1860, 3480, 3720,  4920, ...
      2,  5, 10,  28,  60, 132, 204, 408,  696, 1140, 1740, 2220, 3660, 4440,  5160, ...
      4,  7, 12,  30,  66, 168, 228, 456,  744, 1332, 2040, 2460, 4020, 5580,  5640, ...
      8,  9, 14,  40,  78, 198, 264, 468,  780, 1368, 2088, 2580, 4140, 6960,  6360, ...
     16, 11, 15,  44,  88, 210, 276, 510,  816, 1392, 2232, 2664, 4260, 7224,  6660, ...
     32, 13, 18,  52, 102, 220, 330, 552,  828, 1476, 2280, 2760, 4380, 7632,  7080, ...
     64, 17, 21,  56, 104, 234, 342, 570,  888, 1488, 2436, 2820, 4740, 7896,  7380, ...
    128, 19, 22,  68, 110, 252, 348, 612,  912, 1548, 2544, 2952, 4872, 8280,  7440, ...
    256, 23, 24,  70, 114, 260, 372, 624,  930, 1560, 2604, 3096, 4980, 8496,  7740, ...
    512, 25, 26,  76, 120, 272, 390, 660,  936, 1656, 2736, 3180, 5208, 8784,  8880, ...
   1024, 27, 33,  80, 126, 304, 396, 690,  984, 1692, 2790, 3384, 5220, 8904,  9912, ...
   2048, 29, 34,  90, 130, 306, 414, 792, 1032, 1710, 2832, 3420, 5256, 9030, 10248, ...
   4096, 31, 35,  92, 136, 336, 420, 870, 1044, 1776, 2928, 3540, 5328, 9324, 10440, ...
   8192, 37, 36,  99, 138, 340, 440, 920, 1104, 1908, 3060, 3612, 5340, 9648, 10512, ...
  16384, 41, 38, 100, 140, 368, 444, 966, 1110, 1932, 3108, 3816, 5520, 9660, 10836, ...
  ...
The divisors of 42 are [1, 2, 3, 6, 7, 14, 21, 42] and the largest odd noncomposite divisor is 7 and 7 is its 5th divisor, so T(1,5) = 42 because 42 the smallest number having that property.
		

Crossrefs

Companion of A383961.
Row 1 gives A384232.
Column 1 gives A000079.

Programs

  • Mathematica
    f[n_] := FirstPosition[Divisors[n], FactorInteger[n/2^IntegerExponent[n, 2]][[-1, 1]]][[1]]; seq[m_] := Module[{t = Table[0, {m}, {m}], v = Table[0, {m}], c = 0, k = 1, i, j}, While[c < m*(m + 1)/2, i = f[k]; If[i <= m, j = v[[i]] + 1; If[j <= m - i + 1, t[[i]][[j]] = k; v[[i]]++; c++]]; k++]; Table[t[[j]][[i - j + 1]], {i, 1, m}, {j, 1, i}] // Flatten]; seq[11] (* Amiram Eldar, May 23 2025 *)

Formula

Conjecture: T(n,2) = A061345(n).

A130758 a(n) = n if n is not an odd prime number. Otherwise, a(n) = k, where k is the smallest integer such that n < 10^k.

Original entry on oeis.org

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

Views

Author

Mohammad K. Azarian, Aug 17 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[OddQ[n]&&PrimeQ[n],IntegerLength[n],n],{n,0,70}] (* Harvey P. Dale, Apr 13 2016 *)

Extensions

Offset corrected by Mohammad K. Azarian, Nov 19 2008

A131195 Nonprime record values of Euler's totient function (A000010): 1 and composite n such that phi(n) is greater than all smaller composites.

Original entry on oeis.org

1, 4, 8, 9, 15, 21, 25, 35, 49, 65, 77, 85, 91, 115, 119, 121, 143, 161, 169, 187, 203, 209, 221, 247, 253, 287, 289, 319, 323, 341, 361, 391, 403, 437, 451, 473, 481, 493, 517, 527, 529, 583, 589, 611, 629, 649, 667, 689, 697, 703, 713, 731, 767, 779, 799, 817
Offset: 1

Views

Author

Alonso del Arte, Oct 20 2007

Keywords

Comments

Since phi(p) = p - 1, allowing prime numbers in this sequence would make it A006005, the primes with a 1 replacing the initial 2.
Number of terms < 10^k, k=1,2,3,...: 4, 13, 61, 310, 1628, 9029, 51207, 295132, ..., . Robert G. Wilson v, Feb 19 2019

Examples

			a(3) = 8 because phi(8) = 4, which is greater than phi(4) = phi(6) = 2. (phi(5) = 4 and phi(7) = 6 are ignored because 5 and 7 are prime).
		

Crossrefs

Programs

  • Mathematica
    htcList = {1}; i = 4; currMax = 1; searchMax = 1000; While[i < searchMax, If[Not[PrimeQ[i]] && EulerPhi[i] > currMax, htcList = {htcList, i}; currMax = EulerPhi[i]]; i++ ]; Flatten[htcList]

A278287 Number of primes of the form 4k+3 such that 4(n - k) - 3 is 1 or prime where (4k+3)/3 >= n.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Dec 24 2016

Keywords

Comments

Where 4(n - k) - 3 is a positive noncomposite number of the form 4m+1 (A280084).

Examples

			a(6) = 2 because 4*6 = 1 + 23 where (4*5+3)/3 = 23/3 > 6 and 4*6 = 5 + 19 where (4*4+3)/3 = 19/3 > 6.
		

Crossrefs

A298603 Number of partitions of n into odd prime parts (including 1).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 19, 22, 26, 31, 36, 42, 49, 56, 65, 75, 86, 98, 112, 127, 144, 164, 185, 209, 235, 264, 297, 332, 372, 416, 463, 516, 574, 638, 708, 785, 869, 960, 1061, 1171, 1291, 1421, 1563, 1718, 1886, 2070, 2269, 2484, 2718, 2972, 3247, 3545, 3868, 4216, 4592
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 22 2018

Keywords

Comments

Partial sums of A099773.

Examples

			a(6) = 4 because we have [5, 1], [3, 3], [3, 1, 1, 1] and [1, 1, 1, 1, 1, 1].
		

Crossrefs

Programs

  • Mathematica
    nmax = 62; CoefficientList[Series[1/(1 - x) Product[1/(1 - x^Prime[k]), {k, 2, nmax}], {x, 0, nmax}], x]

Formula

G.f.: (1/(1 - x))*Product_{k>=2} 1/(1 - x^prime(k)).
Previous Showing 31-40 of 62 results. Next