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-5 of 5 results.

A029957 Numbers that are palindromic in base 12.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 145, 157, 169, 181, 193, 205, 217, 229, 241, 253, 265, 277, 290, 302, 314, 326, 338, 350, 362, 374, 386, 398, 410, 422, 435, 447, 459, 471, 483, 495, 507, 519, 531
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

Cf. A029958, A029959, A029960 (in bases 13..15).

Programs

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

Formula

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

A249155 Palindromic in bases 6 and 15.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 14, 80, 160, 301, 602, 693, 994, 1295, 1627, 1777, 2365, 2666, 5296, 5776, 6256, 17360, 34720, 51301, 52201, 105092, 155493, 209284, 587846, 735644, 7904800, 11495701, 80005507, 80469907, 83165017, 89731777, 90196177
Offset: 1

Views

Author

Ray Chandler, Oct 27 2014

Keywords

Comments

Intersection of A029953 and A029960.

Examples

			301 is a term since 301 = 1221 base 6 and 301 = 151 base 15.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_Integer, base_Integer] := Block[{idn = IntegerDigits[n, base]}, idn == Reverse[idn]]; Select[Range[10^6] - 1, palQ[#, 6] && palQ[#, 15] &]
  • Python
    from gmpy2 import digits
    def palQ(n, b): # check if n is a palindrome in base b
        s = digits(n, b)
        return s == s[::-1]
    def palQgen(l, b): # generator of palindromes in base b of length <= 2*l
        if l > 0:
            yield 0
            for x in range(1, l+1):
                for y in range(b**(x-1), b**x):
                    s = digits(y, b)
                    yield int(s+s[-2::-1], b)
                for y in range(b**(x-1), b**x):
                    s = digits(y, b)
                    yield int(s+s[::-1], b)
    A249155_list = [n for n in palQgen(8, 6) if palQ(n, 15)] # Chai Wah Wu, Nov 29 2014

A297286 Numbers whose base-15 digits have equal down-variation and up-variation; see Comments.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 226, 241, 256, 271, 286, 301, 316, 331, 346, 361, 376, 391, 406, 421, 436, 452, 467, 482, 497, 512, 527, 542, 557, 572, 587, 602, 617, 632, 647
Offset: 1

Views

Author

Clark Kimberling, Jan 17 2018

Keywords

Comments

Suppose that n has base-b digits b(m), b(m-1), ..., b(0). The base-b down-variation of n is the sum DV(n,b) of all d(i)-d(i-1) for which d(i) > d(i-1); the base-b up-variation of n is the sum UV(n,b) of all d(k-1)-d(k) for which d(k) < d(k-1). The total base-b variation of n is the sum TV(n,b) = DV(n,b) + UV(n,b). See the guide at A297330.
Differs from A029960 after the zero first for 3391 = 1011_15, which is not in A029960 but in this sequence. - R. J. Mathar, Jan 23 2018

Examples

			647 in base-15:  2,13,2 having DV = 11, UV = 11, so that 647 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    g[n_, b_] := Map[Total, GatherBy[Differences[IntegerDigits[n, b]], Sign]];
    x[n_, b_] := Select[g[n, b], # < 0 &]; y[n_, b_] := Select[g[n, b], # > 0 &];
    b = 15; z = 2000; p = Table[x[n, b], {n, 1, z}]; q = Table[y[n, b], {n, 1, z}];
    w = Sign[Flatten[p /. {} -> {0}] + Flatten[q /. {} -> {0}]];
    Take[Flatten[Position[w, -1]], 120]   (* A297285 *)
    Take[Flatten[Position[w, 0]], 120]    (* A297286 *)
    Take[Flatten[Position[w, 1]], 120]    (* A297287 *)

A046252 Cubes which are palindromes in base 15.

Original entry on oeis.org

0, 1, 8, 64, 512, 4096, 11543176, 13997521, 738763264, 5910106112, 38477541376, 47280848896, 2462562648064, 19700501184512, 129754026714376, 131491746445051, 157604009476096, 8304257709720064, 66434061677760512
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Intersection of A029960 and A000578.
Cf. A046251.

Programs

  • Mathematica
    p15Q[n_]:=Module[{d=IntegerDigits[n,15]},d==Reverse[d]]; Select[Range[ 0,410000]^3,p15Q] (* Harvey P. Dale, Mar 28 2020 *)

Formula

a(n) = A046251(n)^3. - Andrew Howroyd, Aug 10 2024

Extensions

Offset corrected by Andrew Howroyd, Aug 10 2024

A043274 Sum of the digits of the n-th base 15 palindrome.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
Offset: 1

Views

Author

Keywords

Crossrefs

A029960 (base 15 palindromes)
Showing 1-5 of 5 results.