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-10 of 27 results. Next

A008509 Positive integers k such that k-th triangular number is palindromic.

Original entry on oeis.org

1, 2, 3, 10, 11, 18, 34, 36, 77, 109, 132, 173, 363, 1111, 1287, 1593, 1833, 2662, 3185, 3369, 3548, 8382, 11088, 18906, 50281, 57166, 102849, 111111, 167053, 179158, 246642, 337650, 342270, 365436, 417972, 1620621, 3240425, 3457634, 3707883
Offset: 1

Views

Author

Keywords

References

  • Charles W. Trigg, Palindromic Triangular Numbers, J. Rec. Math., 6 (1973), 146-147.
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, 93.

Crossrefs

Programs

A035090 Non-palindromic squares which when written backwards remain square (and still have the same number of digits).

Original entry on oeis.org

144, 169, 441, 961, 1089, 9801, 10404, 10609, 12544, 12769, 14884, 40401, 44521, 48841, 90601, 96721, 1004004, 1006009, 1022121, 1024144, 1026169, 1042441, 1044484, 1062961, 1212201, 1214404, 1216609, 1236544, 1238769, 1256641
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Comments

Squares with trailing zeros not included.
Sequence is infinite, since it includes, e.g., 10^(2k) + 4*10^k + 4 for all k. - Robert Israel, Sep 20 2015

Crossrefs

Reversing a polytopal number gives a polytopal number:
cube to cube: A035123, A035124, A035125, A002781;
square to square: A161902, A035090, A033294, A106323, A106324, A002779;
square to triangular: A181412, A066702;
tetrahedral to tetrahedral: A006030;
triangular to square: A066703, A179889;
triangular to triangular: A066528, A069673, A003098, A066569.
Cf. A319388.

Programs

  • Maple
    rev:= proc(n) local L,i;
    L:= convert(n,base,10);
    add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    filter:= proc(n) local t;
      if n mod 10 = 0 then return false fi;
      t:= rev(n);
    t <> n and issqr(t)
    end proc:
    select(filter, [seq(n^2, n=1..10^5)]); # Robert Israel, Sep 20 2015
  • Mathematica
    Select[Range[1200]^2,!PalindromeQ[#]&&IntegerLength[#]==IntegerLength[ IntegerReverse[ #]] && IntegerQ[Sqrt[IntegerReverse[#]]]&] (* Harvey P. Dale, Jul 19 2023 *)

Formula

a(n) = A035123(n)^2. - R. J. Mathar, Jan 25 2017

A069673 Nonpalindromic triangular numbers whose digit reversal is also a triangular number (possibly with fewer digits).

Original entry on oeis.org

10, 120, 153, 190, 300, 351, 630, 820, 17578, 87571, 156520, 180300, 185745, 547581, 557040, 678030, 1461195, 1851850, 5911641, 6056940, 12145056, 12517506, 16678200, 56440000, 60571521, 65054121, 157433640, 188267310, 304119453, 354911403, 1261250200
Offset: 1

Views

Author

Amarnath Murthy, Apr 06 2002

Keywords

Crossrefs

See A066528 for a different version.

Extensions

More terms from Jason Earls, Jun 07 2002
a(27)-a(31) from Giovanni Resta, Jun 20 2015

A061455 Triangular numbers whose digit reversal is also a triangular number.

Original entry on oeis.org

0, 1, 3, 6, 10, 55, 66, 120, 153, 171, 190, 300, 351, 595, 630, 666, 820, 3003, 5995, 8778, 15051, 17578, 66066, 87571, 156520, 180300, 185745, 547581, 557040, 617716, 678030, 828828, 1269621, 1461195, 1680861, 1851850, 3544453, 5073705, 5676765, 5911641
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			153 is in the sequence because (1) it is a triangular number and (2) its reversal 351 is also a triangular number.
		

Crossrefs

Programs

  • Maple
    read("transforms");
    isA000217 := proc(n) issqr(1+8*n) ;end proc:
    isA061455 := proc(n) isA000217(n) and isA000217(digrev(n)) ; end proc:
    for n from 0 to 60000 do T := A000217(n) ; if isA061455(T) then printf("%d,", T) ; end if; end do: # R. J. Mathar, Dec 13 2010
  • Mathematica
    TriangularNumberQ[k_] := If[IntegerQ[1/2 (Sqrt[1 + 8 k] - 1)], True, False]; Select[Range[0, 5676765], TriangularNumberQ[#] && TriangularNumberQ[FromDigits[Reverse[IntegerDigits[#]]]] &] (* Ant King, Dec 13 2010 *)
  • PARI
    isok(n) = ispolygonal(n, 3) && ispolygonal(fromdigits(Vecrev(digits(n))), 3); \\ Michel Marcus, Apr 14 2019

Formula

a(n)=A000217(k) and A004086(a(n))=A000217(j) for some k and j. - R. J. Mathar, Jun 02 2006

Extensions

More terms from Erich Friedman, May 08 2001
Edited by N. J. A. Sloane, Aug 13 2008 at the suggestion of R. J. Mathar

A066528 Non-palindromic triangular numbers whose reverse is a triangular number with the same number of digits.

Original entry on oeis.org

153, 351, 17578, 87571, 185745, 547581, 1461195, 5911641, 12145056, 12517506, 60571521, 65054121, 304119453, 354911403, 1775275491, 1945725771, 10246462281, 17990863516, 18226464201, 35615002605, 50620051653, 61536809971, 1222080857271, 1664224065406
Offset: 1

Views

Author

Erich Friedman, Jan 08 2002

Keywords

Examples

			153 and 351 are both triangular.
		

Crossrefs

See A069673 for another version.

Programs

  • Mathematica
    dtn[L_] := Fold[10#1+#2&, 0, L]; tritest[n_] := Module[{t}, t=Floor[N[Sqrt[2n]]]; 2n==t(t+1)]; A={}; For[i=1, i>0, i++, t=i(i+1)/2; If[tritest[tt=dtn[Reverse[IntegerDigits[t]]]]&&Mod[t, 10]>0&&t=!=tt, AppendTo[A, t]; Print[A]]]

Extensions

a(22)-a(24) from Giovanni Resta, Jun 20 2015

A350987 Triangular numbers that are binary palindromes.

Original entry on oeis.org

0, 1, 3, 15, 21, 45, 153, 231, 325, 561, 903, 2145, 4095, 8385, 14535, 33153, 58311, 63903, 101475, 131841, 240471, 399171, 525825, 932295, 976503, 1044735, 1308153, 1395285, 1532125, 2100225, 3727815, 8394753, 14680071, 17913105, 33566721, 54054003, 59650503
Offset: 1

Views

Author

Amiram Eldar, Jan 28 2022

Keywords

Comments

This sequence is infinite since (2^k+1)*(2^k+2)/2 = A000217(A028401(k)) is a term for all k>1 (Trigg, 1974).

Examples

			3 is a term since 3 = A000217(2) = 2*(2+1)/2 is a triangular number, and 3 = 11_2 is also a binary palindromic number.
15 is a term since 15 = A000217(5) = 5*(5+1)/2 is a triangular number, and 15 = 1111_2 is also a binary palindromic number.
		

Crossrefs

Intersection of A000217 and A006995.
The binary version of A003098.
A028401 \ {6} is a subsequence.

Programs

  • Mathematica
    t[n_] := n*(n + 1)/2; Select[t /@ Range[0, 2*10^4], PalindromeQ[IntegerDigits[#, 2]] &]
  • Python
    from itertools import count, islice
    def agen():
        for i in count(0):
            t = i*(i+1)//2
            b = bin(t)[2:]
            if b == b[::-1]:
                yield t
    print(list(islice(agen(), 37))) # Michael S. Branicky, Jan 28 2022

Formula

a(n) = A000217(A350988(n)).

A054263 Number of palindromic triangular numbers with n digits.

Original entry on oeis.org

3, 2, 3, 3, 2, 2, 6, 2, 1, 4, 7, 0, 4, 4, 12, 5, 6, 2, 3, 2, 6, 3, 6, 2, 2, 4, 3, 2, 5, 0, 3, 2, 1, 4, 3, 1, 10, 1, 4, 0
Offset: 1

Views

Author

Patrick De Geest, Apr 15 2000

Keywords

Examples

			a(10) = 4: 1264114621, 1634004361, 5289009825, 6172882716.
		

Crossrefs

A066569 Triangular numbers whose reverse is also triangular.

Original entry on oeis.org

1, 3, 6, 55, 66, 153, 171, 351, 595, 666, 3003, 5995, 8778, 15051, 17578, 66066, 87571, 185745, 547581, 617716, 828828, 1269621, 1461195, 1680861, 3544453, 5073705, 5676765, 5911641, 6295926, 12145056, 12517506, 35133153, 60571521
Offset: 1

Views

Author

Erich Friedman, Jan 08 2002

Keywords

Comments

Numbers ending in 0 are not included. - Harry J. Smith, Mar 06 2010

Examples

			153 and 351 are both triangular.
		

Crossrefs

Programs

  • Mathematica
    dtn[L_] := Fold[10#1+#2&, 0, L] tritest[n_] := Module[{t}, t=Floor[N[Sqrt[2n]]]; 2n==t(t+1)] A={}; For[i=1, i>0, i++, t=i(i+1)/2; If[tritest[dtn[Reverse[IntegerDigits[t]]]]&&Mod[t, 10]>0, AppendTo[A, t]; Print[A]]]
    Select[Accumulate[Range[12000]],Last[IntegerDigits[#]]!=0&&OddQ[Sqrt[1+ 8*FromDigits[Reverse[IntegerDigits[#]]]]]&] (* Harvey P. Dale, Jun 04 2015 *)
  • PARI
    Rev(x)= { local(d, r=0); while (x>0, d=x%10; x\=10; r=r*10 + d); return(r) } { n=0; for (m=1, 10^10, t=m*(m + 1)/2; if (t%10 == 0, next); if (issquare(8*Rev(t) + 1), write("b066569.txt", n++, " ", t); if (n==100, return)) ) } \\ Harry J. Smith, Mar 08 2010

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Mar 06 2010

A226742 Triangular numbers obtained as the concatenation of 2*k and k.

Original entry on oeis.org

21, 105, 2211, 9045, 222111, 306153, 742371, 890445, 1050525, 22221111, 88904445, 107905395, 173808690, 2222211111, 8889044445, 12141260706, 15754278771, 222222111111, 888890444445, 22222221111111, 36734701836735, 65306123265306
Offset: 1

Views

Author

Antonio Roldán, Jun 18 2013

Keywords

Comments

Includes (2*10^k+1)*(10^k-1)/9 and (2*10^k+1)*(4*10^k+5)/9 for k >= 1. - Robert Israel, Feb 06 2025

Examples

			If k=111, 2k=222, 2k//k = 222111 = 666*667/2, a triangular number.
		

Crossrefs

Programs

  • Maple
    g:= proc(d) local a, b, n, Res, x, y;
          Res:= NULL:
          for a in numtheory:-divisors(2*(2*10^d+1)) do
            b:= 2*(2*10^d+1)/a;
            if igcd(a, b)>1 then next fi;
            n:= chrem([0, -1], [a, b]);
            x:= n*(n+1)/2;
            y:= x/(2*10^d+1);
            if y < 10^(d-1) or y >= 10^d  then next fi;
            Res:= Res, (2*10^d+1)*y
          od;
          op(sort([Res]))
    end proc:
    map(g, [$1..10]); # Robert Israel, Feb 06 2025
  • Mathematica
    TriangularQ[n_] := IntegerQ[Sqrt[1 + 8*n]]; t = {}; Do[s = FromDigits[Join[IntegerDigits[2*n], IntegerDigits[n]]]; If[TriangularQ[s], AppendTo[t, s]], {n, 100000}]; t (* T. D. Noe, Jun 18 2013 *)
  • PARI
    concatint(a,b)=eval(concat(Str(a),Str(b)))
    istriang(x)=issquare(8*x+1)
    {for(n=1,10^5,a=concatint(2*n,n);if(istriang(a),print(a)))}

A226772 Triangular numbers obtained as the concatenation of n and 2n.

Original entry on oeis.org

36, 1326, 2346, 3570, 125250, 223446, 12502500, 22234446, 1250025000, 2066441328, 2222344446, 2383847676, 3673573470, 125000250000, 222223444446, 5794481158896, 12500002500000, 12857132571426, 22222234444446, 49293309858660, 804878916097578, 933618918672378, 971908519438170
Offset: 1

Views

Author

Antonio Roldán, Jun 18 2013

Keywords

Comments

Includes 125*10^(2*k+1)+25*10^k and (10^k+2)*(1+(10^k-1)*2/9) for k >= 1. - Robert Israel, Nov 09 2020

Examples

			If n=23, 2n=46, n//2n = 2346 = 68*69/2, a triangular number.
		

Crossrefs

Programs

  • Maple
    F:= proc(d) local D,R,M,m,w,x,x1,x2;
       R:= NULL;
       M:= 10^d/2+1;
       D:= numtheory:-divisors(M);
       for m in D do if igcd(m,M/m)=1 then
         for w in [chrem([-1,1],[8*m,M/m]), chrem([1,-1],[8*m,M/m])] do
         x:= (w^2-1)/8;
         x1:= x mod 10^d;
         x2:= floor(x/10^d);
         if x1 = 2*x2 and x1 >= 10^(d-1) then R:= R, x fi
       od fi od;
       op(sort([R]))
    end proc:
    36, seq(F(d),d=2..10); # Robert Israel, Nov 09 2020
  • Mathematica
    TriangularQ[n_] := IntegerQ[Sqrt[1 + 8*n]]; t = {}; Do[s = FromDigits[Join[IntegerDigits[n], IntegerDigits[2*n]]]; If[TriangularQ[s], AppendTo[t, s]], {n, 100000}]; t (* T. D. Noe, Jun 18 2013 *)
  • PARI
    concatint(a,b)=eval(concat(Str(a),Str(b)))
    istriang(x)=issquare(8*x+1)
    {for(n=1,10^5,a=concatint(n,2*n);if(istriang(a),print(a)))}
Showing 1-10 of 27 results. Next