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.

Showing 1-4 of 4 results.

A035254 First differences of A035253.

Original entry on oeis.org

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

Views

Author

Robet Bronson (bob(AT)bronsons.com)

Keywords

Crossrefs

Different from A030124. Cf. A002024, A014132, A014133. First differences are in A035214.

Programs

  • Python
    from math import isqrt
    def A035254(n): return n+(isqrt(n<<3)-5>>1) # Chai Wah Wu, Jun 07 2025

Formula

a(n) = A002024(n)+n-3. - Chai Wah Wu, Jun 07 2025

A228424 Primes that can be written as a sum of a triangular number and a square.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 29, 31, 37, 53, 59, 61, 67, 71, 79, 101, 103, 107, 109, 127, 131, 137, 149, 157, 179, 191, 197, 199, 211, 239, 241, 251, 257, 269, 271, 277, 311, 317, 331, 347, 349, 353, 359, 367, 379, 389, 397, 401, 409, 421, 431, 439, 449, 479, 487, 491, 499, 509, 521
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 10 2013

Keywords

Comments

This sequence is interesting because of the conjecture in the comments in A228425.
Note that the sequence contains all primes of the form x^2 + 1 (A002496) since 1 is a triangular number.

Examples

			a(1) = 2 since 2 = 1*(1+1)/2 + 1^2.
a(2) = 3 since 3 = 2*(2+1)/2 + 0^2.
		

Crossrefs

Subsequence of A014133. Subsequences include A002496, A049423, A056909, A138355, and A243450.

Programs

  • Mathematica
    TQ[n_]:=IntegerQ[Sqrt[8n+1]]
    n=0
    Do[Do[If[TQ[Prime[k]-x^2],n=n+1;Print[n," ",Prime[k]];Goto[aa]],{x,0,Sqrt[Prime[k]]}];
    Label[aa];Continue,{k,1,100}]
  • PARI
    istrg(n) = {if (! issquare(8*n+1), return (0)); return (1);}
    isok(p) = {for (i = 0, sqrtint(p), if (istrg(p-i^2), return (1)););}
    lista(nn) = {forprime(p=2, nn, if (isok(p), print1(p, ", ")););}
    
  • PARI
    list(lim)=my(v=List(if(lim<3,[],[3]))); for(m=1,(sqrtint((lim\=1)*8+1)-1)\2, my(t=m*(m+1)/2); for(s=1,sqrtint(lim-t), my(p=t+s^2); if(isprime(p), listput(v,p)))); Set(v) \\ Charles R Greathouse IV, Aug 28 2024

Formula

Bhattacharya & Rahaman prove that a(n) ≍ n (log n)^(3/2). - Charles R Greathouse IV, Aug 28 2024

A230363 Factorials representable as b^2 + triangular(c).

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 362880, 3628800, 39916800, 479001600, 6227020800, 1307674368000, 121645100408832000
Offset: 1

Views

Author

Alex Ratushnyak, Oct 17 2013

Keywords

Comments

Numbers n such that n! is representable as a sum of a square and a triangular number: 0, 1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 15, 19, ... .
1! = 1/2*1*(1+1), 3! = 1/2*3*(3+1) and 5! = 1/2*15*(15+1)/2 are triangular terms of the sequence. Next such term, if it exists is greater than 10000!. - Farideh Firoozbakht, Oct 18 2013

Examples

			13! = 66708^2+1/2*59616(59616+1) = 78693^2+1/2*8298(8298+1), so 13! = 6227020800 is in the sequence. What is the next term of the sequence which has more than one representation of the form b^2 + triangular(c)? - _Farideh Firoozbakht_, Oct 18 2013
		

Crossrefs

Programs

  • Python
    import math
    f=1
    for n in range(1, 1000000):
        f *= n
        t = b = 0
        while t<=f:
            x = f-t
            a = int(math.sqrt(x))
            if a*a==x:
                print(f, end=", ")
                break
            b += 1
            t = b*(b+1)//2

Formula

A014133 INTERSECT A000142. - R. J. Mathar, Oct 11 2014

Extensions

Initial 1 added by Farideh Firoozbakht, Oct 18 2013

A307645 Numbers that are the sum of a positive triangular number and a positive cube.

Original entry on oeis.org

2, 4, 7, 9, 11, 14, 16, 18, 22, 23, 28, 29, 30, 33, 36, 37, 42, 44, 46, 48, 53, 55, 56, 63, 65, 67, 70, 72, 74, 79, 82, 85, 86, 92, 93, 99, 100, 105, 106, 109, 113, 118, 119, 121, 126, 128, 130, 131, 132, 135, 137, 140, 142, 144, 146, 147, 153, 154, 155, 161, 163, 169, 170, 172, 179
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 19 2019

Keywords

Crossrefs

Formula

Exponents in expansion of (Sum_{i>=1} x^(i*(i+1)/2)) * (Sum_{j>=1} x^(j^3)).
Showing 1-4 of 4 results.