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 11-18 of 18 results.

A065724 Primes p such that the decimal expansion of its base-6 conversion is also prime.

Original entry on oeis.org

2, 3, 5, 7, 19, 37, 67, 79, 97, 103, 127, 157, 163, 193, 229, 283, 307, 337, 439, 487, 547, 571, 601, 631, 643, 673, 733, 751, 757, 853, 877, 907, 937, 1021, 1033, 1039, 1087, 1093, 1117, 1171, 1249, 1279, 1423, 1567, 1627, 1663, 1723, 1753, 1831, 1873
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p6 = (6) [p] (10).

Examples

			E.g., 1627_10 = 11311_6 is prime, and so is 11311_10.
		

Crossrefs

Primes in A036959.
Cf. A065720 up to A065727, A065361.

Programs

  • Mathematica
    Select[ Range[1900], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 6]]] & ]
    Select[Prime[Range[300]],PrimeQ[FromDigits[IntegerDigits[#,6]]]&] (* Harvey P. Dale, Jul 17 2025 *)
  • PARI
    isok(p) = isprime(p) && isprime(fromdigits(digits(p, 6), 10)); \\ Michel Marcus, Mar 05 2022

A065725 Primes p such that the decimal expansion of its base-7 conversion is also prime.

Original entry on oeis.org

2, 3, 5, 17, 29, 31, 43, 59, 71, 127, 157, 197, 211, 227, 239, 241, 337, 353, 367, 379, 409, 463, 491, 563, 577, 619, 647, 743, 757, 773, 787, 857, 911, 953, 967, 1093, 1123, 1163, 1193, 1249, 1303, 1373, 1429, 1459, 1471, 1499, 1583, 1597, 1613, 1627, 1669
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p7 = (7) [p] (10).

Examples

			E.g., 787_10 = 2203_7 is prime, and so is 2203_10.
		

Crossrefs

Primes in A036961.
Cf. A065720 up to A065727, A065361.

Programs

  • Mathematica
    Select[ Range[2500], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 7]]] & ]
    Select[Prime[Range[300]],PrimeQ[FromDigits[IntegerDigits[#,7]]]&] (* Harvey P. Dale, Nov 10 2022 *)
  • PARI
    isok(p) = isprime(p) && isprime(fromdigits(digits(p, 7), 10)); \\ Michel Marcus, Mar 05 2022

A065726 Primes p whose base-8 expansion is also the decimal expansion of a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 31, 43, 59, 67, 71, 89, 137, 151, 179, 191, 199, 223, 251, 257, 281, 283, 307, 311, 337, 353, 359, 367, 383, 409, 419, 433, 443, 449, 523, 563, 617, 619, 641, 659, 727, 787, 809, 811, 857, 887, 907, 919, 947, 977, 1033, 1039, 1097, 1123
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p8 = (8) [p] (10).

Examples

			E.g., 787_10 = 1423_8 is prime, and so is 1423_10.
		

Crossrefs

Primes in A036963.
Cf. A065720 up to A065727, A065361.
Cf. A090707 - A091924, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[ Range[2500], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 8]]] & ]
  • PARI
    is(p, b=10, c=8)=isprime(vector(#d=digits(p, c), i, b^(#d-i))*d~)&&isprime(p) \\ This code can be used for other bases b, c when b>c. See A235265 for code also valid for bM. F. Hasler, Jan 12 2014

Extensions

Definition clarified by M. F. Hasler, Jan 12 2014

A303787 a(n) = Sum_{i=0..m} d(i)*4^i, where Sum_{i=0..m} d(i)*5^i is the base-5 representation of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, 16, 17, 18, 19, 20, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 27, 28, 28, 29, 30, 31, 32, 32, 33, 34, 35, 36, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 44, 45, 46, 47, 48, 48, 49, 50, 51
Offset: 0

Views

Author

Seiichi Manyama, Apr 30 2018

Keywords

Examples

			13 = 23_5, so a(13) = 2*4 + 3 = 11.
14 = 24_5, so a(14) = 2*4 + 4 = 12.
15 = 30_5, so a(15) = 3*4 + 0 = 12.
16 = 31_5, so a(16) = 3*4 + 1 = 13.
		

Crossrefs

Sum_{i=0..m} d(i)*b^i, where Sum_{i=0..m} d(i)*(b+1)^i is the base (b+1) representation of n: A065361 (b=2), A215090 (b=3), this sequence (b=4), A303788 (b=5), A303789 (b=6).

Programs

  • Julia
    function a(n)
        m, r, b = n, 0, 1
        while m > 0
            m, q = divrem(m, 5)
            r += b * q
            b *= 4
        end
    r end; [a(n) for n in 0:73] |> println # Peter Luschny, Jan 03 2021
  • PARI
    a(n) = fromdigits(digits(n, 5), 4); \\ Michel Marcus, May 02 2018
    
  • Ruby
    def f(k, ary)
      (0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i}
    end
    def A(k, n)
      (0..n).map{|i| f(k, i.to_s(k + 1).split('').map(&:to_i).reverse)}
    end
    p A(4, 100)
    

A303788 a(n) = Sum_{i=0..m} d(i)*5^i, where Sum_{i=0..m} d(i)*6^i is the base-6 representation of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 25, 26, 27, 28, 29, 30, 25, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 35, 35, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 50, 51, 52, 53, 54, 55
Offset: 0

Views

Author

Seiichi Manyama, Apr 30 2018

Keywords

Examples

			16 = 24_6, so a(16) = 2*5 + 4 = 14.
17 = 25_6, so a(17) = 2*5 + 5 = 15.
18 = 30_6, so a(18) = 3*5 + 0 = 15.
19 = 31_6, so a(19) = 3*5 + 1 = 16.
		

Crossrefs

Sum_{i=0..m} d(i)*b^i, where Sum_{i=0..m} d(i)*(b+1)^i is the base (b+1) representation of n: A065361 (b=2), A215090 (b=3), A303787 (b=4), this sequence (b=5), A303789 (b=6).
Cf. A037465.

Programs

  • PARI
    a(n) = fromdigits(digits(n, 6), 5); \\ Michel Marcus, May 02 2018
  • Ruby
    def f(k, ary)
      (0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i}
    end
    def A(k, n)
      (0..n).map{|i| f(k, i.to_s(k + 1).split('').map(&:to_i).reverse)}
    end
    p A(5, 100)
    

A303789 a(n) = Sum_{i=0..m} d(i)*6^i, where Sum_{i=0..m} d(i)*7^i is the base-7 representation of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 24, 25, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 36, 37, 38, 39, 40, 41, 42, 42, 43, 44, 45, 46, 47, 48, 48, 49, 50, 51, 52, 53, 54, 54, 55
Offset: 0

Views

Author

Seiichi Manyama, Apr 30 2018

Keywords

Examples

			19 = 25_7, so a(19) = 2*6 + 5 = 17.
20 = 26_7, so a(20) = 2*6 + 6 = 18.
21 = 30_7, so a(21) = 3*6 + 0 = 18.
22 = 31_7, so a(22) = 3*6 + 1 = 19.
		

Crossrefs

Sum_{i=0..m} d(i)*b^i, where Sum_{i=0..m} d(i)*(b+1)^i is the base (b+1) representation of n: A065361 (b=2), A215090 (b=3), A303787 (b=4), A303788 (b=5), this sequence (b=6).
Cf. A037470.

Programs

  • PARI
    a(n) = fromdigits(digits(n, 7), 6); \\ Michel Marcus, May 02 2018
  • Ruby
    def f(k, ary)
      (0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i}
    end
    def A(k, n)
      (0..n).map{|i| f(k, i.to_s(k + 1).split('').map(&:to_i).reverse)}
    end
    p A(6, 100)
    

A065362 Rebase n from 4 to 2. Replace 4^k with 2^k in quaternary expansion of n.

Original entry on oeis.org

1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8, 9, 4, 5, 6, 7, 6, 7, 8, 9, 8, 9, 10, 11, 10, 11, 12, 13, 8, 9, 10, 11, 10, 11, 12, 13, 12, 13, 14, 15, 14, 15, 16, 17, 12, 13, 14, 15, 14, 15, 16, 17, 16, 17, 18, 19, 18, 19, 20, 21, 8, 9, 10, 11, 10, 11, 12, 13, 12, 13, 14, 15, 14, 15, 16, 17
Offset: 1

Views

Author

Marc LeBrun, Oct 31 2001

Keywords

Comments

Notation: (4)[n](2).

Examples

			24 = 120 -> 1(4) + 2(2) + 0(1) = 8 = a(24).
		

Crossrefs

Cf. A065361.

Programs

  • Julia
    function a(n)
        m, r, b = n, 0, 1
        while m > 0
            m, q = divrem(m, 4)
            r += b * q
            b *= 2
        end
    r end; [a(n) for n in 0:79] |> println # Peter Luschny, Jan 03 2021
  • Mathematica
    t = Table[FromDigits[RealDigits[n, 4], 2], {n, 1, 100}] (* Clark Kimberling, Aug 02 2012 *)
  • PARI
    Rebase(x, b, c)= { local(d, e=0, f=1); while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=c); return(e) } { for (n=1, 1000, write("b065362.txt", n, " ", Rebase(n, 4, 2)) ) } \\ Harry J. Smith, Oct 17 2009
    

Formula

a(n) = 2*a(n/4) if n == 0 (mod 4); otherwise, a(n) = a(n-1) + 1. - Clark Kimberling, Aug 03 2012

A274515 a(n) is the number of times that the value of ternary n when read as hyperbinary occurs in the set of hyperbinary representations.

Original entry on oeis.org

1, 1, 2, 2, 1, 3, 3, 2, 3, 3, 2, 3, 3, 1, 4, 4, 3, 5, 4, 3, 5, 5, 2, 5, 5, 3, 4, 4, 3, 5, 5, 2, 5, 5, 3, 4, 5, 3, 4, 4, 1, 5, 5, 4, 7, 5, 4, 7, 7, 3, 8, 8, 5, 7, 5, 4, 7, 7, 3, 8, 8, 5, 7, 8, 5, 7, 7, 2, 7, 7, 5, 8, 7, 5, 8, 8, 3, 7, 7, 4, 5, 5, 4, 7, 7, 3, 8
Offset: 0

Views

Author

Max Barrentine, Jun 25 2016

Keywords

Comments

Stern's diatomic sequence A002487 counts the ways (n+1) can be represented if one allows 2's to be included in (n)'s binary representation (its "hyperbinary representations" in the terminology of A002487). A065361 maps ternary ordering onto these hyperbinary representations.

Examples

			5 in ternary is 12, which when read in hyperbinary is equal to 4. 6 in ternary is 20, which when read in hyperbinary is equal to 4. 9 in ternary is 100, which when read in hyperbinary is equal to 4. Since these are the only ways to represent 4 in hyperbinary, a(5) = a(6) = a(9) = 3.
		

Crossrefs

Formula

a(n) = A002487(A065361(n) + 1).
Previous Showing 11-18 of 18 results.