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 21-30 of 55 results. Next

A351717 Numbers whose maximal (or lazy) Lucas representation (A130311) is palindromic.

Original entry on oeis.org

0, 2, 3, 5, 6, 10, 12, 14, 17, 20, 28, 30, 34, 36, 42, 46, 56, 61, 75, 77, 85, 92, 94, 101, 107, 115, 122, 128, 150, 166, 176, 198, 200, 211, 219, 233, 244, 246, 260, 271, 277, 288, 296, 310, 321, 345, 360, 396, 405, 441, 469, 484, 520, 522, 544, 562, 570, 588
Offset: 1

Views

Author

Amiram Eldar, Feb 17 2022

Keywords

Comments

A001610(n) = Lucas(n+1) - 1 is a term for all n, since A001610(0) = 0 has the representation 0 and the representation of Lucas(n+1) - 1 is n 1's for n > 0.

Examples

			The first 10 terms are:
   n  a(n)  A130311(a(n))
   ----------------------
   1   0               0
   2   2               1
   3   3              11
   4   5             101
   5   6             111
   6  10            1111
   7  12           10101
   8  14           11011
   9  17           11111
  10  20          101101
		

Crossrefs

Programs

  • Mathematica
    lazy = Select[IntegerDigits[Range[6000], 2], SequenceCount[#, {0, 0}] == 0 &]; t = Total[# * Reverse @ LucasL[Range[0, Length[#] - 1]]] & /@ lazy; s = FromDigits /@ lazy[[TakeWhile[Flatten[FirstPosition[t, #] & /@ Range[Max[t]]], NumberQ]]]; Join[{0}, Position[s, _?PalindromeQ] // Flatten]

A029971 Palindromic primes in base 3.

Original entry on oeis.org

2, 13, 23, 151, 173, 233, 757, 937, 1093, 1249, 1429, 1487, 1667, 1733, 1823, 1913, 1979, 2069, 8389, 9103, 10111, 12301, 14951, 16673, 16871, 18593, 60103, 60913, 61507, 63127, 69697, 73243, 78979, 80599, 82003, 82813, 83407, 85027
Offset: 1

Views

Author

Keywords

Comments

Intersection of A000040 and A014190. - Michel Marcus, Aug 19 2015

Crossrefs

Cf. A117698 (in base 3), A014190.

Programs

  • Maple
    N:= 14: # to get all terms < 3^N
    Res:= 2:
    digrev:=proc(n) local L;
      L:= convert(n,base,3);
      add(L[-i]*3^(i-1),i=1..nops(L))
    end proc;
    for d from 2 to N do
      if d::even then
        m:= d/2;
        Res:= Res, op(select(isprime,[seq](n*3^m + digrev(n), n=3^(m-1)..3^m-1)));
      else
        m:= (d-1)/2;
        Res:= Res, op(select(isprime,[seq](seq(n*3^(m+1)+y*3^m+digrev(n),
          y=0..2), n=3^(m-1)..3^m-1)));
      fi
    od:
    Res; # Robert Israel, Aug 19 2015
  • Mathematica
    Do[s = RealDigits[n, 3][[1]]; If[PrimeQ[n], If[FromDigits[s] == FromDigits[Reverse[s]], Print[n]]], {n, 1, 8500}]
    Select[Prime[Range[8300]], Reverse[x = IntegerDigits[#, 3]] == x &] (* Jayanta Basu, Jun 23 2013 *)
  • PARI
    lista(nn) = forprime(p=2, nn, if ((d=digits(p,3)) && (Vecrev(d)==d), print1(p, ", "))); \\ Michel Marcus, Aug 19 2015

A352087 Numbers whose minimal (or greedy) tribonacci representation (A278038) is palindromic.

Original entry on oeis.org

0, 1, 3, 5, 8, 14, 18, 23, 25, 36, 40, 45, 52, 62, 71, 78, 82, 102, 110, 128, 148, 150, 163, 181, 198, 211, 229, 233, 246, 264, 275, 312, 326, 360, 397, 411, 426, 463, 477, 505, 529, 562, 593, 617, 650, 658, 682, 715, 746, 770, 781, 805, 838, 869, 893, 926, 928
Offset: 1

Views

Author

Amiram Eldar, Mar 04 2022

Keywords

Comments

A000073(n) + 1 is a term for n>=4, since its minimal tribonacci representation is 10...01 with n-4 0's between the two 1's.

Examples

			The first 10 terms are:
   n  a(n)  A278038(a(n))
  -----------------------
   1   0                0
   2   1                1
   3   3               11
   4   5              101
   5   8             1001
   6  14            10001
   7  18            10101
   8  23            11011
   9  25           100001
  10  36           101101
		

Crossrefs

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; q[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; PalindromeQ[FromDigits @ IntegerDigits[Total[2^(s - 1)], 2]]]; Select[Range[0, 1000], q]

A352105 Numbers whose maximal tribonacci representation (A352103) is palindromic.

Original entry on oeis.org

0, 1, 3, 5, 7, 8, 14, 18, 23, 27, 36, 40, 51, 52, 62, 69, 78, 88, 95, 102, 110, 130, 148, 156, 176, 181, 194, 211, 229, 242, 246, 264, 277, 294, 312, 325, 326, 363, 397, 411, 448, 463, 477, 514, 548, 562, 599, 617, 650, 674, 682, 715, 739, 770, 803, 827, 838, 862
Offset: 1

Views

Author

Amiram Eldar, Mar 05 2022

Keywords

Comments

A027084(n) is a term since its maximal tribonacci representation is n-1 1's and no 0's.
The pairs {A008937(3*k+1)-1, A008937(3*k+1)} = {0, 1}, {7, 8}, {51, 52}, ... are consecutive terms in this sequence: the maximal tribonacci representation of A008937(3*k+1)-1 is 3*k 1's and no 0's (except for k=0 where the representation is 0), and the maximal tribonacci representation of A008937(3*k+1) is of the form 100100...1001 with k blocks of 100 followed by a 1 at the end.

Examples

			The first 10 terms are:
   n  a(n)  A352103(a(n))
  --  ----  -------------
   1    0               0
   2    1               1
   3    3              11
   4    5             101
   5    7             111
   6    8            1001
   7   14            1111
   8   18           10101
   9   23           11011
  10   27           11111
		

Crossrefs

A027084 is a subsequence.

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; trib[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; IntegerDigits[Total[2^(s - 1)], 2]]; q[n_] := Module[{v = trib[n]}, nv = Length[v]; i = 1; While[i <= nv - 3, If[v[[i ;; i + 3]] == {1, 0, 0, 0}, v[[i ;; i + 3]] = {0, 1, 1, 1}; If[i > 3, i -= 4]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, True, PalindromeQ[FromDigits[v[[i[[1, 1]] ;; -1]]]]]]; Select[Range[0, 1000], q]

A029958 Numbers that are palindromic in base 13.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 170, 183, 196, 209, 222, 235, 248, 261, 274, 287, 300, 313, 326, 340, 353, 366, 379, 392, 405, 418, 431, 444, 457, 470, 483, 496, 510, 523, 536, 549, 562
Offset: 1

Views

Author

Keywords

Comments

Cilleruelo, Luca, & Baxter prove that this sequence is an additive basis of order (exactly) 3. - Charles R Greathouse IV, May 04 2020

Crossrefs

Palindromes in bases 2 through 12: A006995, A014190, A014192, A029952, A029953, A029954, A029803, A029955, A002113, A029956, A029957.

Programs

  • Mathematica
    f[n_,b_]:=Module[{i=IntegerDigits[n,b]},i==Reverse[i]];lst={};Do[If[f[n,13],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 08 2009 *)
    Select[Range[0,600],IntegerDigits[#,13]==Reverse[IntegerDigits[#,13]]&] (* Harvey P. Dale, Nov 16 2022 *)
  • PARI
    isok(n) = my(d=digits(n, 13)); d == Vecrev(d); \\ Michel Marcus, May 13 2017
    
  • Python
    from sympy import integer_log
    from gmpy2 import digits
    def A029958(n):
        if n == 1: return 0
        y = 13*(x:=13**integer_log(n>>1,13)[0])
        return int((c:=n-x)*x+int(digits(c,13)[-2::-1]or'0',13) if nChai Wah Wu, Jun 14 2024

Formula

Sum_{n>=2} 1/a(n) = 3.55686013... (Phunphayap and Pongsriiam, 2019). - Amiram Eldar, Oct 17 2020

A214425 Numbers n palindromic in exactly three bases b, 2 <= b <= 10.

Original entry on oeis.org

9, 10, 21, 40, 55, 63, 65, 80, 85, 100, 130, 154, 164, 178, 191, 195, 203, 235, 242, 255, 257, 273, 282, 292, 300, 325, 328, 341, 400, 455, 585, 656, 819, 910, 2709, 4095, 4097, 4161, 6643, 8200, 12291, 12483, 14762, 20485, 20805, 21525, 21845, 32152, 53235
Offset: 1

Views

Author

T. D. Noe, Jul 18 2012

Keywords

Comments

In the first 1234 terms, only 28 of the possible 84 triples of bases occur. Does every triple occur eventually? - T. D. Noe, Aug 17 2012
See A238893 for the three bases. By far, the most common bases are (2,4,8). - T. D. Noe, Mar 07 2014 (exception are in A260184. - Giovanni Resta and Robert G. Wilson v, Jul 17 2015).

Examples

			10 is palindromic in bases 3, 4, and 9.
273 is in the sequence because 100010001_2 = 101010_3 = 10101_4 = 2043_5 = 1133_6 = 540_7 = 421_8 = 333_9 = 273_10 and three of the bases, namely 2, 4 & 9, yield palindromes. - _Giovanni Resta_ and _Robert G. Wilson v_, Jul 17 2015
		

Crossrefs

Cf. A050813, A214423, A214424, A214426 (palindromic in 0-2 and 4 bases).

Programs

  • Mathematica
    n = -1; t = {}; While[Length[t] < 100, n++; If[Count[Table[s = IntegerDigits[n, m]; s == Reverse[s], {m, 2, 10}], True] == 3, AppendTo[t, n]]]; t

Formula

A050812(n) = 3.
The intersection of A006995, A014190, A014192, A029952, A029953, A029954, A029803, A029955 & A002113 which yields just three members. - Giovanni Resta and Robert G. Wilson v, Jul 17 2015

A331891 Negabinary palindromes: nonnegative numbers whose negabinary expansion (A039724) is palindromic.

Original entry on oeis.org

0, 1, 3, 5, 7, 11, 17, 21, 23, 31, 43, 51, 57, 65, 77, 85, 87, 103, 127, 143, 155, 171, 195, 211, 217, 233, 257, 273, 285, 301, 325, 341, 343, 375, 423, 455, 479, 511, 559, 591, 603, 635, 683, 715, 739, 771, 819, 851, 857, 889, 937, 969, 993, 1025, 1073, 1105, 1117
Offset: 1

Views

Author

Amiram Eldar, Jan 30 2020

Keywords

Comments

Numbers of the form 2^(2*m-1) - 1 (A083420) and 2^(2*m) + 1 (A052539) are terms.

Examples

			5 is a term since its negabinary representation is 101 which is palindromic.
		

Crossrefs

Programs

  • Mathematica
    negabin[n_] := negabin[n] = If[n==0, 0, negabin[Quotient[n-1, -2]]*10 + Mod[n, 2]]; Select[Range[0, 1200], PalindromeQ @ negabin[#] &]

A352319 Numbers whose minimal (or greedy) Pell representation (A317204) is palindromic.

Original entry on oeis.org

0, 1, 3, 6, 8, 13, 20, 30, 35, 40, 44, 49, 71, 88, 102, 119, 170, 182, 194, 204, 216, 238, 242, 254, 266, 276, 288, 409, 450, 484, 525, 559, 580, 621, 655, 696, 986, 1015, 1044, 1068, 1097, 1150, 1160, 1189, 1218, 1242, 1271, 1334, 1363, 1392, 1396, 1425, 1454
Offset: 1

Views

Author

Amiram Eldar, Mar 12 2022

Keywords

Comments

A052937(n) = A000129(n+1)+1 is a term for n>0, since its minimal Pell representation is 10...01 with n-1 0's between two 1's.
A048739 is a subsequence since these are repunit numbers in the minimal Pell representation.
A001109 is a subsequence. The minimal Pell representation of A001109(n), for n>1, is 1010...01, with n-1 0's interleaved with n 1's.

Examples

			The first 10 terms are:
   n  a(n)  A317204(a(n))
  --  ----  -------------
   1     0              0
   2     1              1
   3     3             11
   4     6            101
   5     8            111
   6    13           1001
   7    20           1111
   8    30          10001
   9    35          10101
  10    40          10201
		

Crossrefs

Subsequences: A001109, A048739, A052937 \ {2}.

Programs

  • Mathematica
    pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; q[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[pell[k] <= m, k++]; k--; AppendTo[s, k]; m -= pell[k]; k = 1]; PalindromeQ[IntegerDigits[Total[3^(s - 1)], 3]]]; Select[Range[0, 1500], q]

A352341 Numbers whose maximal Pell representation (A352339) is palindromic.

Original entry on oeis.org

0, 1, 3, 6, 8, 10, 20, 27, 40, 49, 54, 58, 63, 68, 88, 93, 119, 136, 150, 167, 221, 238, 288, 300, 310, 322, 334, 338, 360, 372, 382, 394, 406, 508, 530, 542, 696, 737, 771, 812, 833, 867, 908, 942, 983, 1242, 1276, 1317, 1392, 1681, 1710, 1734, 1763, 1792, 1802
Offset: 1

Views

Author

Amiram Eldar, Mar 12 2022

Keywords

Comments

A000129(n) - 2 is a term for n > 1. The maximal Pell representations of these numbers are 0, 11, 121, 1221, 12221, ... (0 and A132583).
A048739 is a subsequence since these are the repunit numbers in the maximal Pell representation.
A065113 is a subsequence since the maximal Pell representation of A065113(n) is 2*n 2's.

Examples

			The first 10 terms are:
   n  a(n)  A352339(a(n))
  --  ----  -------------
   1    0               0
   2    1               1
   3    3              11
   4    6              22
   5    8             111
   6   10             121
   7   20            1111
   8   27            1221
   9   40            2222
  10   49           11111
		

Crossrefs

Programs

  • Mathematica
    pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; pellp[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[pell[k] <= m, k++]; k--; AppendTo[s, k]; m -= pell[k]; k = 1]; IntegerDigits[Total[3^(s - 1)], 3]]; lazy[n_] := Module[{v = pellp[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] > 0 && v[[i + 1]] == 0 && v[[i + 2]] < 2, v[[i ;; i + 2]] += {-1, 2, 1}; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, FromDigits[v[[i[[1, 1]] ;; -1]]]]]; Select[Range[0, 2000], PalindromeQ[lazy[#]] &]

A029959 Numbers that are palindromic in base 14.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 197, 211, 225, 239, 253, 267, 281, 295, 309, 323, 337, 351, 365, 379, 394, 408, 422, 436, 450, 464, 478, 492, 506, 520, 534, 548, 562, 576, 591
Offset: 1

Views

Author

Keywords

Comments

Cilleruelo, Luca, & Baxter prove that this sequence is an additive basis of order (exactly) 3. - Charles R Greathouse IV, May 04 2020

Examples

			195 is DD in base 14.
196 is 100 in base 14, so it's not in the sequence.
197 is 101 in base 14.
		

Crossrefs

Palindromes in bases 2 through 13: A006995, A014190, A014192, A029952, A029953, A029954, A029803, A029955, A002113, A029956, A029957, A029958.

Programs

  • Mathematica
    palQ[n_, b_:10] := Module[{idn = IntegerDigits[n, b]}, idn == Reverse[idn]]; Select[ Range[0, 600], palQ[#, 14] &] (* Harvey P. Dale, Aug 03 2014 *)
  • PARI
    isok(n) = Pol(d=digits(n, 14)) == Polrev(d); \\ Michel Marcus, Mar 12 2017
    
  • Python
    from sympy import integer_log
    from gmpy2 import digits
    def A029959(n):
        if n == 1: return 0
        y = 14*(x:=14**integer_log(n>>1,14)[0])
        return int((c:=n-x)*x+int(digits(c,14)[-2::-1]or'0',14) if nChai Wah Wu, Jun 14 2024

Formula

Sum_{n>=2} 1/a(n) = 3.6112482... (Phunphayap and Pongsriiam, 2019). - Amiram Eldar, Oct 17 2020
Previous Showing 21-30 of 55 results. Next