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 11-15 of 15 results.

A318894 Positions of terms > 1 in A205007, or equally, where A205006(n) != n.

Original entry on oeis.org

1, 6, 10, 28, 36, 66, 78, 120, 136, 190, 276, 406, 496, 528, 666, 820, 946, 1128, 1378, 1770, 1830, 2016, 2080, 2278, 2556, 2628, 3160, 3486, 3828, 3916, 4656, 5050, 5356, 5778, 5886, 6328, 8128, 8256, 8646, 9316, 9730, 11026, 11476, 12246, 13366, 14028, 14878, 15576, 16110, 16290, 16836, 17578, 18336, 18528, 19306, 19900, 22366
Offset: 1

Views

Author

Antti Karttunen, Sep 28 2018

Keywords

Comments

It seems that A205007(a(n)) = 2 and moreover, apart from the initial 1, the sequence seems to be a subsequence of even triangular numbers, A014494.

Crossrefs

A352116 Partial sums of the odd triangular numbers (A014493).

Original entry on oeis.org

1, 4, 19, 40, 85, 140, 231, 336, 489, 660, 891, 1144, 1469, 1820, 2255, 2720, 3281, 3876, 4579, 5320, 6181, 7084, 8119, 9200, 10425, 11700, 13131, 14616, 16269, 17980, 19871, 21824, 23969, 26180, 28595, 31080, 33781, 36556, 39559, 42640, 45961, 49364, 53019, 56760, 60765
Offset: 1

Views

Author

David James Sycamore, Mar 05 2022

Keywords

Examples

			a(1) = 1 because 1 is the first odd term in A000027.
a(2) = 1 + 3 = 4, the sum of the first two odd terms in A000027, and so on.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 4, 19, 40, 85, 140}, 50] (* Amiram Eldar, Mar 05 2022 *)
  • PARI
    to(n) = (2*n-1)*(2*n-1-(-1)^n)/2; \\ A014493
    a(n) = sum(k=1, n, to(k)); \\ Michel Marcus, Mar 05 2022
    
  • Python
    def A352116(n): return n*((n-1)<<1)*(n+1)//3 + n*(n&1) # Chai Wah Wu, Feb 12 2023

Formula

a(n) = Sum_{k=1..n} A014493(k) = Sum_{k=1..n} (2*k-1)(2*k-1-(-1)^k)/2.
a(n) = A352115(n-1) + (-1)^(n-1)*n.
a(n) = A000447(n) - A352115(n-1).
From Stefano Spezia, Mar 05 2022: (Start)
a(n) = n*(4*n^2 - 1 - 3*(-1)^n)/6.
G.f.: x*(1 + 2*x + 10*x^2 + 2*x^3 + x^4)/((1 - x)^4*(1 + x)^2). (End)

Extensions

More terms from Michel Marcus, Mar 05 2022

A345350 Even triangular numbers such that the next integer is nonprime.

Original entry on oeis.org

0, 120, 300, 406, 496, 528, 666, 780, 1176, 1378, 1540, 1770, 2278, 2628, 3160, 3240, 3486, 3828, 4186, 4278, 5356, 5460, 5886, 6670, 6786, 7140, 7260, 7626, 7750, 8128, 8256, 9316, 9730, 10296, 10440, 10878, 11476, 11628, 12090, 12246, 12880, 13530, 14706, 15576
Offset: 1

Views

Author

Tanya Khovanova, Jun 15 2021

Keywords

Comments

Subsequence of A000217 (triangular numbers) and A014494 (even triangular numbers).

Examples

			Even triangular numbers 6, 10, 28, 36, 66, and 78 are all followed by a prime number. Even triangular number 120 is followed by a composite number 121. Thus, a(1) = 120.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[n (n + 1)/2, {n, 0, 200}], EvenQ[#] && ! PrimeQ[# + 1] &]
    Select[Accumulate[Range[0,300]],EvenQ[#]&&!PrimeQ[#+1]&] (* Harvey P. Dale, Mar 23 2025 *)
  • PARI
    lista(nn) = for (n=1, nn, my(t=n*(n+1)/2); if (!(t%2) && !isprime(t+1), print1(t, ", "))) \\ Michel Marcus, Jun 16 2021
  • Python
    from sympy import isprime
    def A014494(n): return (2*n+1)*(2*n+1-(-1)**n)//2
    def ok(et): return not isprime(et+1)
    print(list(filter(ok, (A014494(n) for n in range(90))))) # Michael S. Branicky, Jun 15 2021
    

A133012 Even imperfect numbers.

Original entry on oeis.org

2, 4, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118
Offset: 1

Views

Author

Omar E. Pol, Oct 20 2007

Keywords

Crossrefs

Cf. A005843, A014445, A014494. Imperfect numbers: A132999.

A133016 Even imperfect numbers, divided by 2.

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64
Offset: 1

Views

Author

Omar E. Pol, Oct 20 2007

Keywords

Crossrefs

Cf. A005843, A014335, A014445, A014494, A026503, A028334. Imperfect numbers: A132999.
Previous Showing 11-15 of 15 results.