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-10 of 12 results. Next

A079107 Number of digits of A077722(n) written in base 8.

Original entry on oeis.org

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

Views

Author

Francois Jooste (phukraut(AT)hotmail.com), Dec 23 2002

Keywords

Examples

			a(5)=6 since A077722(5)=32833, which has an octal form of 100101 (6 digits).
		

Crossrefs

Cf. A077722.

Programs

  • Maple
    s := 0:for n from 1 to 7000 do b := convert(n,base,2): q := sum(b[i]*8^(i-1),i=1..nops(b)): if(isprime(q)) then s := s+1:a[s] := nops(b):fi: od:seq(a[k],k=1..s);

Extensions

More terms from Sascha Kurz, Feb 10 2003

A079108 Number of 1's in the base 8 form of A077722(n).

Original entry on oeis.org

3, 3, 3, 4, 3, 4, 5, 4, 5, 3, 4, 3, 5, 5, 5, 4, 3, 4, 5, 5, 5, 4, 5, 5, 4, 3, 4, 5, 5, 6, 6, 4, 5, 6, 8, 4, 5, 6, 6, 5, 3, 4, 4, 5, 6, 5, 3, 4, 6, 5, 6, 8, 6, 5, 4, 6, 8, 5, 5, 5, 6, 6, 8, 3, 4, 5, 4, 6, 6, 5, 6, 8, 4, 5, 5, 6, 5, 8, 4, 6, 8, 6, 8, 6, 8, 8, 8, 5, 6, 6, 5, 5, 5, 8, 4, 6, 6, 8, 8, 9, 6, 8, 5, 5, 4
Offset: 1

Views

Author

Francois Jooste (phukraut(AT)hotmail.com), Dec 23 2002

Keywords

Examples

			a(5)=3 since A077722(5)=32833, which has an octal form of 100101, which has 3 ones.
		

Crossrefs

Cf. A077722.

Programs

  • Maple
    s := 0:for n from 1 to 7000 do b := convert(n,base,2):q := sum(b[i]*8^(i-1),i=1..nops(b)): if(isprime(q)) then s := s+1:a[s] := sum(b[i],i=1..nops(b)):fi:od:seq(a[k],k=1..s);

Extensions

More terms from Sascha Kurz, Feb 10 2003

A079109 Number of zeros in the base 8 form of A077722(n).

Original entry on oeis.org

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

Views

Author

Francois Jooste (phukraut(AT)hotmail.com), Dec 23 2002

Keywords

Examples

			a(5)=3 since A077722(5)=32833 which has octal form 100101, which has 3 zeros.
		

Crossrefs

Cf. A077722.

Extensions

More terms from Sascha Kurz, Jan 02 2003

A077718 Primes which can be expressed as sum of distinct powers of 4.

Original entry on oeis.org

5, 17, 257, 277, 337, 1093, 1109, 1297, 1301, 1361, 4177, 4357, 4373, 4421, 5189, 5381, 5393, 5441, 16453, 16657, 16661, 17477, 17489, 17669, 17681, 17729, 17749, 20549, 20753, 21521, 21569, 21589, 21841, 65537, 65557, 65617, 65809, 66629
Offset: 1

Views

Author

Amarnath Murthy, Nov 19 2002

Keywords

Comments

Primes whose base 4 representation contains only zeros and 1's.
As a subsequence of primes in A000695, these could be called Moser-de Bruijn primes. See also A235461 for those terms whose base 4 representation also represents a prime in base 2. - M. F. Hasler, Jan 11 2014

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,x;
      L:= convert(n,base,2);
      x:= 1+add(L[i]*4^i,i=1..nops(L));
      if isprime(x) then x fi
    end proc:
    map(f, [$1..1000]); # Robert Israel, Sep 06 2018
  • Mathematica
    Select[Prime[Range[6650]],Max[IntegerDigits[#,4]]<=1&] (* Jayanta Basu, May 22 2013 *)
  • PARI
    for(i=1,999,isprime(b=vector(#b=binary(i),j,4^(#b-j))*b~)&&print1(b",")) \\ - M. F. Hasler, Jan 12 2014

Extensions

More terms from Sascha Kurz, Jan 03 2003

A077717 Primes which can be expressed as a sum of distinct powers of 3.

Original entry on oeis.org

3, 13, 31, 37, 109, 271, 283, 337, 733, 739, 757, 769, 811, 823, 1009, 1063, 1093, 2269, 2281, 2467, 2521, 2539, 2551, 2917, 2953, 3001, 3037, 3163, 3169, 3187, 3253, 3271, 6571, 6673, 6679, 6841, 7321, 7411, 7537, 7561, 7573, 8761, 8779, 8839, 9001
Offset: 1

Views

Author

Amarnath Murthy, Nov 19 2002

Keywords

Comments

Primes whose base 3 representation contains only 0's and 1's.

Examples

			31 = 3^3 + 3 + 1 belongs to this sequence.
		

Crossrefs

Programs

Extensions

More terms from John W. Layman, Nov 22 2002

A077720 Primes which can be expressed as sum of distinct powers of 6.

Original entry on oeis.org

7, 37, 43, 223, 1297, 1303, 1549, 7993, 9109, 46663, 54469, 55987, 281233, 326593, 327889, 335917, 1679653, 1679659, 1679833, 1680919, 1681129, 1687393, 1726273, 1726489, 1727569, 1727827, 1734049, 1960891, 1961107, 1967587, 2006461
Offset: 1

Views

Author

Amarnath Murthy, Nov 19 2002

Keywords

Comments

Primes whose base 6 representation contains only zeros and 1's.

Crossrefs

Programs

  • Mathematica
    Select[FromDigits[#,6]&/@Tuples[{0,1},9],PrimeQ] (* Harvey P. Dale, May 01 2018 *)

Extensions

More terms from Sascha Kurz, Jan 03 2003

A077721 Primes which can be expressed as sum of distinct powers of 7.

Original entry on oeis.org

7, 2801, 17207, 19559, 120401, 134513, 134807, 137201, 840743, 842759, 842801, 941249, 943601, 958007, 958049, 958343, 960793, 5782001, 5784409, 5899307, 5899601, 5899657, 5901659, 6591089, 6607903, 6706393, 6708787, 6722801, 6722857, 6723193
Offset: 1

Views

Author

Amarnath Murthy, Nov 19 2002

Keywords

Comments

Primes whose base 7 representation contains only zeros and 1's.

Crossrefs

Programs

  • Maple
    pos := 0:for i from 1 to 4000 do b := convert(i,base,2); s := sum(b[j]*7^(j-1),j=1..nops(b)): if(isprime(s)) then pos := pos+1:a[pos] := s:fi: od:seq(a[j],j=1..pos);
  • Mathematica
    Select[Prime[Range[10^6]], Max[IntegerDigits[#, 7]]<=1 &] (* Vincenzo Librandi, Sep 07 2018 *)

Extensions

More terms from Sascha Kurz, Jan 03 2003

A077719 Primes which can be expressed as sum of distinct powers of 5.

Original entry on oeis.org

5, 31, 131, 151, 631, 751, 3251, 3881, 16381, 19381, 19501, 19531, 78781, 78901, 81281, 81401, 81901, 82031, 93901, 94531, 97001, 97501, 97651, 390751, 390781, 393901, 394501, 406381, 468781, 469501, 471901, 472631, 484531, 485131, 487651, 1953151, 1953901
Offset: 1

Views

Author

Amarnath Murthy, Nov 19 2002

Keywords

Comments

Primes whose base 5 representation contains only zeros and 1's.

Crossrefs

Programs

  • Python
    from sympy import isprime
    def aupton(terms):
      k, alst = 0, []
      while len(alst) < terms:
        k += 1
        t = sum(5**i*int(di) for i, di in enumerate((bin(k)[2:])[::-1]))
        if isprime(t): alst.append(t)
      return alst
    print(aupton(37)) # Michael S. Branicky, May 31 2021

Extensions

More terms from Sascha Kurz, Jan 03 2003
a(36) and beyond from Michael S. Branicky, May 31 2021

A077723 Primes which can be expressed as sum of distinct powers of 9.

Original entry on oeis.org

739, 811, 6571, 59779, 65701, 532261, 538093, 591301, 597133, 597781, 4783699, 4789621, 4842109, 4849399, 5314411, 5314501, 5373469, 5374279, 5380831, 43047541, 43112341, 43113061, 43643773, 43643863, 47837071, 47888821
Offset: 1

Views

Author

Amarnath Murthy, Nov 19 2002

Keywords

Comments

Primes whose base 9 representation contains only zeros and 1's.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[3000000]],Union[Most[Rest[DigitCount[#,9]]]]=={0}&] (* Harvey P. Dale, Jul 31 2013 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (vecmax(digits(p, 9)) <= 1, print1(p, ", ")););} \\ Michel Marcus, Oct 10 2014

Extensions

More terms from Sascha Kurz, Jan 03 2003

A077724 a(n) = smallest prime which can be expressed as a sum of distinct powers of n.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 73, 739, 11, 11, 13, 13, 197, 241, 17, 17, 19, 19, 401, 463, 23, 23, 577, 10171901, 677, 757, 29, 29, 31, 31, 32801, 1123, 1336337, 44101, 37, 37, 1483, 59359, 41, 41, 43, 43, 85229, 93151, 47, 47, 110641, 13847169701, 2551, 345157903, 53, 53
Offset: 2

Views

Author

Amarnath Murthy, Nov 19 2002

Keywords

Comments

a(n) = smallest prime whose base n representation contains only zeros and 1's.
Values of n at which a(n) reach record values are: 2, 3, 4, 6, 8, 9, 25, 49, 91, 121, 187, 201, 301, 721, 799, 841... Notably, many of them are squares of primes. - Ivan Neretin, Sep 20 2017

Crossrefs

Programs

  • Mathematica
    Table[i = p = 1; While[! PrimeQ[p], p = FromDigits[IntegerDigits[i++, 2], n]]; p, {n, 2, 53}] (* Ivan Neretin, Sep 20 2017 *)
  • Python
    from itertools import count
    from sympy import isprime
    def A077724(n): return next(filter(isprime,(sum(n**i for i, j in enumerate(bin(m)[-1:1:-1]) if j=='1') for m in count(1)))) # Chai Wah Wu, Apr 04 2025

Extensions

More terms from Sascha Kurz, Jan 03 2003
Showing 1-10 of 12 results. Next