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.

A253651 Triangular numbers that are the product of a triangular number and a prime number.

Original entry on oeis.org

0, 3, 6, 15, 21, 45, 66, 78, 105, 190, 210, 231, 435, 465, 630, 861, 903, 1035, 1326, 2415, 2556, 2628, 3003, 3570, 4005, 4950, 5460, 5565, 5995, 7140, 8646, 8778, 9870, 12246, 16471, 16836, 17205, 17391, 17766, 20100, 22155, 26565, 26796, 28680, 28920, 30381, 32131, 33411, 33930, 36856
Offset: 1

Views

Author

Antonio Roldán, Jan 07 2015

Keywords

Examples

			190 is in the sequence because it is triangular (190=19*20/2) and 190=10*19, with 10 triangular number and 19 prime number.
		

Crossrefs

Cf. A029549 (T is 2*t), A076140 (T is 3*t), A225503 (first T to be prime(n)*t).

Programs

  • Maple
    N:= 10^5: # to get all terms <= N
    Primes:= select(isprime, [2,seq(2*k+1,k=1..N/3)]):
    select(t -> issqr(1+8*t), {seq(seq(a*(a+1)/2*p, a = 2 .. floor(sqrt(2*N/p))), p = Primes)});
    # if using Maple 11 or earlier, uncomment the next line
    # sort(convert(%,list)); # Robert Israel, Jan 07 2015
  • Mathematica
    Join[{0},Module[{nn=300,trs},trs=Accumulate[Range[nn]];Select[ trs,AnyTrue[ #/trs,PrimeQ]&]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 16 2018 *)
  • PARI
    {i=1; j=2;print1(0,", "); while(i<=10^5, k=1; p=2; c=0; while(k1, c=k); if(c>0, print1(i, ", ")); k+=p; p+=1); i+=j; j+=1)}

A225502 Least m > 0 such that prime(n)*triangular(m) is a triangular number, or 0 if no such m exists.

Original entry on oeis.org

2, 1, 2, 2, 3, 3, 12, 4, 9, 5, 5, 30, 6, 6, 20, 14, 230, 23, 24, 8, 8, 35, 36, 9, 29, 90, 30, 434, 10, 159, 22, 11, 140, 530, 854, 147, 12, 25, 77, 39, 1938509, 13, 41, 69, 182, 70, 14, 104, 105, 60, 30, 15, 15, 47, 240, 65274, 6314, 16, 17009, 33, 50, 68, 17, 264, 371
Offset: 1

Views

Author

Alex Ratushnyak, May 09 2013

Keywords

Comments

Conjecture: a(n) > 0.

Examples

			n    prime(n)    m     tri(m)   prime(n)*tri(m)
1      2         2       3              6
2      3         1       1              3
3      5         2       3             15
4      7         2       3             21
5     11         3       6             66
6     13         3       6             78
7     17        12      78           1326
8     19         4      10            190
		

Crossrefs

Programs

  • C
    #include 
    #define TOP 300
    typedef unsigned long long U64;
    U64 isTriangular(U64 a) {
        U64 sr = 1ULL<<32, s, b, t;
        if (a < (sr/2)*(sr+1))  sr>>=1;
        while (a < sr*(sr+1)/2)  sr>>=1;
        for (b = sr>>1; b; b>>=1) {
            s = sr+b;
            if (s&1) t = s*((s+1)/2);
            else     t = (s/2)*(s+1);
            if (t >= s && a >= t)  sr = s;
        }
        return (sr*(sr+1)/2 == a);
    }
    int main() {
      U64 i, j, k, m, tm, p, pp = 1, primes[TOP];
      for (primes[0]=2, i = 3; pp < TOP; i+=2) {
        for (p = 1; p < pp; ++p) if (i%primes[p]==0) break;
        if (p==pp) {
            primes[pp++] = i;
            for (j=p=primes[pp-2], m=tm=1; ; j=k, m++, tm+=m) {
               if ((k = p*tm) < j) { m=0; break; }
               if (isTriangular(k)) break;
            }
            printf("%llu, ", m);
        }
      }
      return 0;
    }
  • Mathematica
    lm[n_]:=Module[{m=1,p=Prime[n]},While[!OddQ[Sqrt[8(p (m(m+1))/2)+1]], m++];m]; Array[lm,68] (* Harvey P. Dale, Mar 16 2018 *)

A225789 Least triangular number of the form p*triangular(n) where p is a prime number, or 0 if no such triangular number exists.

Original entry on oeis.org

0, 3, 6, 66, 190, 45, 105, 0, 2556, 1035, 5995, 8646, 1326, 16471, 210, 28680, 36856, 46971, 0, 72010, 630, 3003, 32131, 16836, 20100, 52975, 246051, 17766, 329266, 42195, 17205, 491536, 0, 17391, 0, 49770, 55278, 0, 30381, 5460, 0, 164451, 33411, 0, 4950, 85905, 584821
Offset: 0

Views

Author

Alex Ratushnyak, May 16 2013

Keywords

Crossrefs

Formula

a(n) = A225787(n) * A000217(n).

Extensions

a(28) corrected by Mansour Qahwaji, Jul 25 2019

A227054 a(n) = least triangular number t > 0 such that n*t is a triangular number, or 0 if no such t exists.

Original entry on oeis.org

1, 3, 1, 0, 3, 1, 3, 15, 0, 1, 6, 3, 6, 15, 1, 0, 78, 21, 10, 6, 1, 3, 45, 190, 0, 3, 55, 1, 15, 10, 15, 28203, 45, 105, 3, 1, 465, 120, 55, 3, 21, 15, 21, 3570, 1, 6, 210, 861, 0, 6, 3, 15, 105, 21945, 1, 21, 3, 66, 26565, 91, 276, 378, 6, 0, 1596, 1, 300
Offset: 1

Views

Author

Alex Ratushnyak, Jun 29 2013

Keywords

Comments

a(n) = 1 if and only if n is a triangular number.
Indices of conjectured 0's: 4, 9, 16, 25, 49, 64, 81, 121, 144, 169, 225, 256, 289, 361, 400, 441, 529, 576, 625, 729, ... These are squares of 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27.
a(n) = 0 if n = p^(2*j) where p is a prime and j > 0. - Jon E. Schoenfield, Sep 17 2023

Examples

			a(614) = 13964154294535688630985 = A000217(167117648945) because 614 * a(614) = A000217(4141012131555), and none of the smaller triangular numbers t satisfies 614*t = A000217(m) for some m.
		

Crossrefs

Cf. A166478 (indices of t in A000217), A225502, A225503.

Extensions

a(1)-a(25) and a(49)-a(67) from Jon E. Schoenfield, Sep 17 2023
Showing 1-4 of 4 results.