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 41-50 of 55 results. Next

A329459 Numbers whose ternary and Zeckendorf representations are both palindromic.

Original entry on oeis.org

0, 1, 4, 56, 80, 203, 572, 847, 1402, 93496, 128180, 431060, 467852, 1465676, 7742920, 8727388, 8923840, 9582707, 18245944, 18304588, 25154692, 27262924, 115404434, 209060644, 763786258, 860973806, 2042328148, 4719261289, 5236838932, 18202403140, 42897493894, 77310551669
Offset: 1

Views

Author

Alex Ratushnyak, Nov 13 2019

Keywords

Comments

Intersection of A014190 and A094202.

Crossrefs

Extensions

a(24)-a(32) from Daniel Suteu, Nov 16 2019

A338828 For any number with ternary representation (t(1), t(2), ..., t(k)), the ternary representation of a(n) is (abs(t(1)-t(k)), abs(t(2)-t(k-1)), ..., abs(t(k)-t(1))).

Original entry on oeis.org

0, 0, 0, 4, 0, 4, 8, 4, 0, 10, 0, 10, 10, 0, 10, 10, 0, 10, 20, 10, 0, 20, 10, 0, 20, 10, 0, 28, 0, 28, 40, 12, 40, 52, 24, 52, 40, 12, 40, 28, 0, 28, 40, 12, 40, 52, 24, 52, 40, 12, 40, 28, 0, 28, 56, 28, 0, 68, 40, 12, 80, 52, 24, 68, 40, 12, 56, 28, 0, 68
Offset: 0

Views

Author

Rémy Sigrist, Nov 11 2020

Keywords

Comments

Leading zeros are ignored.

Crossrefs

Cf. A014190, A175919 (binary analog), A338827 (decimal analog).

Programs

  • Maple
    a:= n-> (l-> (h-> add(h[j]*3^(j-1), j=1..nops(h)))([seq(
        abs(l[i]-l[-i]), i=1..nops(l))]))(convert(n, base, 3)):
    seq(a(n), n=0..70);  # Alois P. Heinz, Nov 12 2020
  • PARI
    a(n, base=3) = my (d=digits(n, base)); fromdigits(abs(d-Vecrev(d)), base)

Formula

a(n) = 0 iff n is a palindrome in base 3 (A014190).

A352507 Number whose representation in the base of Catalan numbers (A014418) is palindromic.

Original entry on oeis.org

0, 1, 3, 6, 8, 15, 22, 43, 48, 53, 59, 64, 69, 133, 152, 171, 177, 196, 215, 430, 444, 458, 477, 491, 505, 524, 538, 552, 564, 578, 592, 611, 625, 639, 658, 672, 686, 1431, 1487, 1543, 1568, 1624, 1680, 1705, 1761, 1817, 1862, 1918, 1974, 1999, 2055, 2111, 2136
Offset: 1

Views

Author

Amiram Eldar, Mar 19 2022

Keywords

Comments

The partial sums of the Catalan numbers with positive index (A014138) are terms, since the representation of A014138(n) is n 1's.

Examples

			The first 10 terms are:
   n  a(n)  A014418(a(n))
  --  ----  -------------
   1     0              0
   2     1              1
   3     3             11
   4     6            101
   5     8            111
   6    15           1001
   7    22           1111
   8    43          10001
   9    48          10101
  10    53          10201
		

Crossrefs

Subsequences: A014138, A141351 \ {2}.

Programs

  • Mathematica
    c[n_] := c[n] = CatalanNumber[n]; q[n_] := Module[{s = {}, m = n, i}, While[m > 0, i = 1; While[c[i] <= m, i++]; i--; m -= c[i]; AppendTo[s, i]]; PalindromeQ @ IntegerDigits[Total[4^(s - 1)], 4]]; Select[Range[0, 2000], q]

A354885 Numbers that are palindromes in both ternary and balanced ternary representations.

Original entry on oeis.org

0, 1, 4, 10, 13, 16, 28, 40, 52, 82, 91, 112, 121, 160, 244, 280, 328, 364, 484, 730, 757, 820, 847, 976, 1003, 1066, 1093, 1312, 1456, 2188, 2296, 2440, 2548, 2920, 3028, 3172, 3280, 3904, 4372, 6562, 6643, 6832, 6913, 7300, 7381, 7570, 7651, 8752, 8833, 9022
Offset: 1

Views

Author

Amiram Eldar, Jun 10 2022

Keywords

Examples

			4 is a term since its ternary and balanced ternary representation are both 11 which is a palindrome.
16 is a term since its ternary representation is 121 and its balanced ternary representation (with 2 standing for the -1 digit) is 1221, and both are palindromes.
		

Crossrefs

Intersection of A014190 and A134027.
Subsequences: A003462, A034472 \ {2}, A354886.

Programs

  • Mathematica
    Select[Range[0, 10^4], PalindromeQ[IntegerDigits[#, 3]] && PalindromeQ @ balTernDigits[#] &] (* using balTernDigits by Robert G. Wilson v at A134027 *)
  • PARI
    is(n) = {my (t=digits(n,3)); if (t==Vecrev(t), my (b=[], d); while (n, b=concat(d=[0,1,-1][1+n%3], b); n=(n-d)/3); b==Vecrev(b), 0)} \\ Rémy Sigrist, Jun 10 2022

A354886 Numbers that are palindromes in both ternary and balanced ternary representations with representations that are different.

Original entry on oeis.org

16, 52, 160, 484, 1312, 1456, 3904, 4372, 11680, 12688, 13120, 35008, 37960, 39364, 104992, 106288, 113776, 116800, 118096, 314944, 319156, 341224, 350080, 354292, 944800, 948688, 957760, 1023568, 1027456, 1049920, 1058992, 1062880, 2834368, 2847004, 2873572
Offset: 1

Views

Author

Amiram Eldar, Jun 10 2022

Keywords

Comments

Is a(n) == 16 (mod 18) for all n?

Examples

			16 is a term since its ternary representation is 121 and its balanced ternary representation (with 2 standing for the -1 digit) is 1221, and both are palindromes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 3*10^6], PalindromeQ[d3 = IntegerDigits[#, 3]] && PalindromeQ[db3 = balTernDigits[#]] && d3 != db3 &] (* using balTernDigits by Robert G. Wilson v at A134027 *)

Formula

a(n) = A091077(n) / 4. - Hugo Pfoertner, Jun 10 2022

A364005 Numbers whose Wythoff representation (A189921, A317208) is palindromic.

Original entry on oeis.org

0, 1, 2, 5, 7, 10, 13, 15, 23, 28, 34, 36, 52, 57, 65, 75, 81, 89, 91, 117, 128, 146, 159, 175, 185, 198, 204, 217, 233, 235, 277, 295, 327, 369, 379, 400, 426, 442, 463, 473, 494, 520, 526, 547, 573, 589, 610, 612, 680, 709, 761, 829, 848, 916, 945, 989, 1023
Offset: 1

Views

Author

Amiram Eldar, Jul 01 2023

Keywords

Comments

Includes all the odd-indexed Fibonacci numbers (A001519), since the Wythoff representation of Fibonacci(1) is 1 and the Wythoff representation of Fibonacci(2*n+1), for n >= 1, is n 0's.
A157725(n) = Fibonacci(n) + 2 is a term for n >= 4, since its Wythoff representation is n-4 1's between 2 0's.
A232970 is a subsequence since the Wythoff representation of A232970(n) = (Fibonacci(3*n+1) + 1)/2 is n 0's and n-1 1's interleaved.

Examples

			The first 10 terms are:
   n  a(n)  A317208(a(n))
  --  ----  -------------
   1     0              0
   2     1              1
   3     2              2
   4     5             22
   5     7            212
   6    10           2112
   7    13            222
   8    15          21112
   9    23         211112
  10    28          21212
		

Crossrefs

Programs

  • Mathematica
    z[n_] := Floor[(n + 1)*GoldenRatio] - n - 1; h[n_] := z[n] - z[n - 1]; w[n_] := Module[{m = n, zm = 0, hm, s = {}}, While[zm != 1, hm = h[m]; AppendTo[s, hm]; If[hm == 1, zm = z[m], zm = z[z[m]]]; m = zm]; s]; w[0] = {0}; Select[Range[0, 1000], PalindromeQ[w[#]] &]

A364214 Numbers whose canonical representation as a sum of distinct Jacobsthal numbers (A280049) is palindromic.

Original entry on oeis.org

1, 2, 4, 5, 6, 10, 12, 15, 18, 21, 22, 30, 34, 42, 44, 49, 58, 63, 66, 71, 80, 85, 86, 102, 110, 126, 130, 146, 154, 170, 172, 183, 198, 209, 218, 229, 244, 255, 258, 269, 284, 295, 304, 315, 330, 341, 342, 374, 390, 422, 430, 462, 478, 510, 514, 546, 562, 594
Offset: 1

Views

Author

Amiram Eldar, Jul 14 2023

Keywords

Comments

The even-indexed Jacobsthal numbers A001045(2*n) = A002450(n) = (4^n-1)/3, for n >= 1, are terms since their representation is 2*n-1 1's.
A001045(2*n+1) - 1 = A020988(n) = (2/3)*(4^n-1) is a term for n >= 1, since its representation is 2*n 1's.
A001045(n) + 1 = A128209(n) is a term for n >= 0, since its representation for n = 0 is 1 and its representation for n >= 1 is n-1 0's between 2 1's.
A160156(n) is a term for n >= 0 since its representation is n 0's interleaved with n+1 1's.

Examples

			The first 10 terms are:
   n  a(n)  A280049(a(n))
  --  ----  -------------
   1     1              1
   2     2             11
   3     4            101
   4     5            111
   5     6           1001
   6    10           1111
   7    12          10001
   8    15          10101
   9    18          11011
  10    21          11111
		

Crossrefs

Programs

  • Mathematica
    Position[Select[Range[1000], EvenQ[IntegerExponent[#, 2]] &], _?(PalindromeQ[IntegerDigits[#, 2]] &)] // Flatten
  • PARI
    s(n) = if(n < 2, n > 0, n = s(n-1); until(valuation(n, 2)%2 == 0, n++); n); \\ A003159
    is(n) = {my(d = binary(s(n))); d == Vecrev(d);}

A043262 Sum of digits of n-th base 3 palindrome.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A014190 (base 3 palindromes)

Programs

  • Mathematica
    Total/@Select[IntegerDigits[Range[0,2000],3],#==Reverse[#]&] (* Harvey P. Dale, Aug 08 2019 *)
  • Python
    from gmpy2 import digits
    def A043262(n):
        if n == 1: return 0
        y = 3*(x:=3**(len(digits(n>>1, 3))-1))
        return int((s:=digits(n-x,3))[-1])+(sum(int(d) for d in s[:-1])<<1) if nChai Wah Wu, Jul 24 2024

A260184 Numbers n written in base 10 that are palindromic in exactly three bases b, 2 <= b <= 10 and not simultaneously bases 2, 4 and 8.

Original entry on oeis.org

9, 10, 21, 40, 55, 80, 85, 100, 130, 154, 164, 178, 191, 203, 235, 242, 255, 257, 273, 282, 292, 300, 328, 400, 455, 585, 656, 819, 910, 2709, 6643, 8200, 14762, 32152, 53235, 74647, 428585, 532900, 1181729, 1405397, 4210945, 5259525, 27711772, 719848917, 43253138565
Offset: 1

Views

Author

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    (* see A214425 and set all terms as lst, then *)
    gQ[n_] := Count[ palQ[n,#] & /@ {2, 4, 8}, True];
    Select[ lst, gQ[#] != 3 &]

Formula

The intersection of A006995, A014190, A014192, A029952, A029953, A029954, A029803, A029955 & A002113 which yields just three members, not simultaneously bases 2, 4 and 8.

A309574 n-th prime minus its ternary (base 3) reversal.

Original entry on oeis.org

0, 2, -2, 2, -8, 0, -8, 8, 0, -26, -6, 6, -26, -6, -14, -26, -6, 14, 26, -6, 38, 26, -80, -128, -48, -80, -24, -128, 24, -80, 24, -80, -32, 24, -56, 0, 24, 80, -24, 0, -48, 80, 24, 80, -24, 104, 80, 80, 48, 104, 0, 24, 80, -398, -338, -278, -434, 18, -138
Offset: 1

Views

Author

Keywords

Comments

a(n) = 0 if and only if n is palindromic in base 3 - if and only if A000040(n) is in A014190.
As it occurs in its binary cousin, we observe that a scatter plot of this sequence shows parallelograms.
All terms are even. - Alois P. Heinz, Aug 08 2019

Crossrefs

Programs

  • Maple
    a:= n-> (p-> p-(l->add(l[-i]*3^(i-1), i=1..nops(l))
            )(convert(p, base, 3)))(ithprime(n)):
    seq(a(n), n=1..61);  # Alois P. Heinz, Aug 08 2019
  • Mathematica
    (# - IntegerReverse[#,3]) &@ Prime@ Range@ 60 (* Giovanni Resta, Aug 09 2019 *)
  • PARI
    a(n) = my(p=prime(n)); p - fromdigits(Vecrev(digits(p, 3)), 3); \\ Michel Marcus, Aug 09 2019
  • Python
    from sympy import primerange
    def rev(n, b):
        m = 0
        while n > 0:
            m, n = m*b+n%b, n//b
        return m
    n, aa = 1, 1
    while n <20:
        if aa in primerange(1,200):
            print(n, aa-rev(aa, 3))
            n = n+1
        aa = aa+1 # A.H.M. Smeets, Aug 09 2019
    

Formula

a(n) = A000040(n) - A030102(A000040(n)).
a(n) = A055947(A000040(n)).
Previous Showing 41-50 of 55 results. Next