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 51-55 of 55 results.

A308311 Numbers n which are palindromic in base b, where b = sum of digits of n in base 10.

Original entry on oeis.org

16, 39, 41, 55, 96, 104, 123, 130, 141, 142, 155, 170, 181, 187, 214, 239, 250, 251, 260, 262, 274, 341, 343, 365, 385, 418, 422, 424, 435, 443, 464, 471, 494, 503, 505, 507, 543, 562, 599, 632, 665, 685, 706, 708, 753, 754, 818, 823, 835, 838, 843, 850, 859
Offset: 1

Views

Author

Metin Sariyar, Sep 26 2019

Keywords

Examples

			41 is a term because 41 = 131 in base 5 = 1 + 4.
		

Crossrefs

Cf. A007632.

Programs

  • Mathematica
    Select[Range[10^5],#==IntegerReverse[#, Total[IntegerDigits[#]]]&]
  • PARI
    isok(n) = my(s=sumdigits(n)); if (s> 1, my(d = digits(n, s)); d == Vecrev(d)); \\ Michel Marcus, Sep 26 2019

A340559 Numbers that are palindromic in base 2 and base 16.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 15, 17, 51, 85, 119, 153, 255, 257, 273, 771, 819, 1285, 1317, 1365, 1397, 1799, 1831, 1879, 1911, 2313, 2409, 2457, 2553, 3855, 3951, 3999, 4095, 4097, 4369, 12291, 13107, 20485, 21029, 21845, 22389, 28679, 29223, 30039, 30583, 36873, 38505
Offset: 1

Views

Author

Glen Gilchrist, Jan 11 2021

Keywords

Crossrefs

Intersection of A006995 and A029730.

Programs

  • Mathematica
    Select[Range[0, 10^5], PalindromeQ @ IntegerDigits[#, 2] && PalindromeQ @ IntegerDigits[#, 16]  &] (* Amiram Eldar, Jan 11 2021 *)
  • PARI
    ispal(m, b) = my(d=digits(m, b)); d == Vecrev(d);
    isok(m) = ispal(m, 2) && ispal(m, 16); \\ Michel Marcus, Jan 20 2021
  • Python
    def palindrome(x):
        res = str(x) == str(x)[::-1]
        return res
    def dec_to_bin(x):
        return int(bin(x)[2:])
    def dec_to_hex(x):
        return (hex(x)[2:])
    for x in range (1,10000):
        if palindrome(dec_to_hex(x)) & palindrome(dec_to_bin(x)) == True:
              print(x)
    (BASIC:- MM Basic, a modern QBASIC variant, https://www.mmbasic.com/)
    Function reverse(in_string$) As string
      Local r$
      Local i
      For i = Len(in_string$) To 1 Step -1
          b$=Mid$(in_string$,i,1)
          r$=r$+b$
      Next i
      reverse=r$
    End Function
    For i = 1 To 10000
      If Bin$(i) = reverse(Bin$(i)) Then
          If Hex$(i) = reverse(Hex$(i)) Then
              Print i,Bin$(i), Hex$(i)
          EndIf
      EndIf
    Next i
    

A046472 Primes that are palindromic in bases 2 and 10.

Original entry on oeis.org

3, 5, 7, 313, 7284717174827, 390714505091666190505417093
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1998

Keywords

Examples

			313_10 = 100111001_2. - _Jon E. Schoenfield_, Apr 10 2021
		

Crossrefs

Cf. A002385 (palindromic primes), A007632 (palindromes in bases 2 and 10).

Programs

  • Mathematica
    Select[Prime[Range[10!]], IntegerDigits[#]==Reverse[IntegerDigits[#]] && IntegerDigits[#,2]==Reverse[IntegerDigits[#,2]]&] (* Vladimir Joseph Stephan Orlovsky, Dec 30 2010 *)
    p = Sort[Reap[Do[d=IntegerDigits[n]; p1=FromDigits[Join[Most[d], Reverse[d]]]; p2=FromDigits[Join[d, Reverse[d]]]; If[IntegerDigits[p1, 2] == Reverse[IntegerDigits[p1, 2]], Sow[p1]]; If[IntegerDigits[p2, 2] == Reverse[IntegerDigits[p2, 2]], Sow[p2]], {n, 0, 9999999}]][[2, 1]]]; Select[p, PrimeQ]

Extensions

a(6) (from A007632) added by T. D. Noe, Dec 31 2010

A124404 Nonpalindromes in base 10 that are non-palindromes in base 2.

Original entry on oeis.org

10, 12, 13, 14, 16, 18, 19, 20, 23, 24, 25, 26, 28, 29, 30, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 47, 48, 49, 50, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 64, 67, 68, 69, 70, 71, 72, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 96, 97, 98
Offset: 1

Views

Author

Tanya Khovanova, Dec 26 2006

Keywords

Crossrefs

Cf. A007632 = numbers that are palindromic in bases 2 and 10.

Programs

  • Mathematica
    Select[Range[100], Reverse[IntegerDigits[ # ]] != IntegerDigits[ # ] && Reverse[IntegerDigits[ #, 2]] != IntegerDigits[ #, 2] &]

A127916 Number of n-digit palindromes in bases 2 and 10. Also difference of A120764(n).

Original entry on oeis.org

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

Views

Author

Anton Chupin (chupin(AT)icmm.ru), Apr 08 2007

Keywords

Examples

			Palindromes in bases 2 and 10 are (A007632): 0, 1, 3, 5, 7, 9, 33, 99, 313, 585, 717, 7447, 9009, 15351, 32223... So a(1)=6 one-digit numbers, a(2)=2 two-digit palindromes and so on.
		

Crossrefs

Previous Showing 51-55 of 55 results.