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 14 results. Next

A069662 Largest n-digit prime with maximum digit sum.

Original entry on oeis.org

7, 89, 997, 8999, 99989, 989999, 9899999, 99999989, 998999999, 9999898999, 99989999999, 999999999989, 9999999999799, 99999999899999, 999999999999989, 9999999999989999, 99999999999899999, 999999999999999989, 9998999999999999999, 99999999999999999989
Offset: 1

Views

Author

Amarnath Murthy, Apr 05 2002

Keywords

Crossrefs

Cf. A069661, A020472 (primes with digits 8 and 9 only), A003618 (largest n-digit prime).

Extensions

More terms from Rick L. Shepherd, Jul 15 2002. a(5) through a(20) have been certified prime with Primo.

A069663 Smallest n-digit prime with minimum digit sum.

Original entry on oeis.org

2, 11, 101, 1021, 10111, 100003, 1000003, 10010101, 101001001, 1000000021, 10000001101, 100000000003, 1000000020001, 10000000001011, 100000000100101, 1000000000100011, 10000000000001101, 100000000000000003
Offset: 1

Views

Author

Amarnath Murthy, Apr 05 2002

Keywords

Examples

			a(5) = 10111 is the least prime with digit sum 4 and no other/smaller 5 digit prime has a digit sum 4 or less.
		

Crossrefs

Extensions

More terms from Sascha Kurz, Aug 25 2002
Edited by N. J. A. Sloane, May 05 2007

A069664 Largest n-digit prime with minimum digit sum.

Original entry on oeis.org

2, 11, 101, 3001, 21001, 102001, 2100001, 30000001, 200001001, 2010000001, 30000000001, 110000000101, 2000001000001, 20000000100001, 200000010000001, 1100010000000001, 20000001000000001, 110000000000000101, 2000000000000100001, 20000000100000000001
Offset: 1

Views

Author

Amarnath Murthy, Apr 05 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[ Max[ Flatten[Table[ If[PrimeQ[10^n + 1], 10^n + 1, If[PrimeQ[10^n + 10^i + 10^j + 1], 10^n + 10^i + 10^j + 1, 0]], {i, 0, n}, {j, 0, i}]]], {n, 0, 50}] (* Program works so long as there exists an n-digit prime with digit sum 4 or less. *)

Extensions

a(7)-a(12) from Tom Mueller, Apr 28 2004
a(13) and onwards added by Joel B. Lewis, Jan 07 2008

A241206 Greatest n-digit prime having at least n-1 identical digits.

Original entry on oeis.org

7, 97, 997, 9949, 99991, 999979, 9999991, 99999989, 999999929, 9999999929, 99999999599, 999999999989, 9999999999799, 99999999999959, 999999999999989, 9999999999999199, 99999999999999997, 999999999999999989, 9999999999999999919, 99999999999999999989, 999999999999999999899, 9999999999999999999929
Offset: 1

Views

Author

Michel Lagneau, Apr 17 2014

Keywords

Comments

Not the same as A069661 (Smallest n-digit prime with maximum digit sum). For example, A069661(10) = 9899989999 with only n-2 = 8 identical digits.
Conjecture: each term consists of at least n-1 digits 9 and no digit 0. - Chai Wah Wu, Dec 10 2015

Crossrefs

Programs

  • Maple
    with(numtheory):lst:={}:nn:=30:kk:=0:T:=array(1..nn):U:=array(1..20):
       for n from 2 to nn do:
         for i from 1 to n do:
         T[i]:=9:
         od:
         ii:=0:
            for j from 1 to n while(ii=0)do:
            for k from 9 by -1 to 0 while(ii=0)do:
            T[n-j+1]:=k:s:=sum('T[i]*10^(n-i)', 'i'=1..n):
             if type(s,prime)=true and length(s)=n
             then
             ii:=1: kk:=kk+1:U[kk]:=s:
             else
             T[n-j+1]:=9:
             fi:
           od:
         od:
        od :
         print(U) :
  • Mathematica
    Table[SelectFirst[Reverse@ Prime@ Range[PrimePi[10^(n - 1)] + 1, PrimePi[10^n - 1]], Max@ DigitCount@ # >= (n - 1) &], {n, 2, 8}]
    (* WARNING: the following assumes the conjecture is true WARNING *)
    Table[SelectFirst[Select[Reverse@ Union@ Map[FromDigits, Join @@ Map[Permutations[Append[Table[9, {n - 1}], #]] &, Range[0, 9]]], PrimeQ@ # && IntegerLength@ # == n &], Max@ DigitCount@ # >= (n - 1) &], {n, 2, 20}] (* Michael De Vlieger, Dec 10 2015, Version 10 *)
  • Python
    from _future_ import division
    from sympy import isprime
    def A241206(n):
        for i in range(9,0,-1):
            x = i*(10**n-1)//9
            for j in range(n-1,-1,-1):
                for k in range(9-i,-1,-1):
                    y = x + k*(10**j)
                    if isprime(y):
                        return y
            for j in range(n):
                for k in range(1,i+1):
                    if j < n-1 or k < i:
                        y = x-k*(10**j)
                        if isprime(y):
                            return y # Chai Wah Wu, Dec 29 2015

Extensions

a(1) added - N. J. A. Sloane, Dec 29 2015

A069665 Smallest n-digit square with maximum digit sum.

Original entry on oeis.org

9, 49, 289, 6889, 97969, 698896, 9696996, 79869969, 876988996, 8998988769, 88998998929, 975979998889, 9998768898889, 97888999968769, 898999897988929, 9895699989899689, 38999699989995889, 989879999979599689
Offset: 1

Views

Author

Amarnath Murthy, Apr 06 2002

Keywords

Crossrefs

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 14 2003

A069666 Largest n-digit square with maximum digit sum.

Original entry on oeis.org

9, 49, 784, 6889, 97969, 877969, 9696996, 88679889, 876988996, 8998988769, 88998998929, 975979998889, 9998768898889, 97888999968769, 898999897988929, 9896999999766889, 99497897999899876, 989879999979599689
Offset: 1

Views

Author

Amarnath Murthy, Apr 06 2002

Keywords

Crossrefs

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Oct 14 2003

A069667 Smallest nontrivial (no trailing zeros) n-digit square with minimum digit sum.

Original entry on oeis.org

1, 16, 121, 1024, 10201, 101124, 1002001, 24000201, 100020001, 2500100001, 10000200001, 141001001001, 1000002000001, 25000010000001, 100000020000001, 2500000100000001, 10000000200000001, 250000001000000001
Offset: 1

Views

Author

Amarnath Murthy, Apr 06 2002

Keywords

Crossrefs

Extensions

More terms from Sascha Kurz, Feb 02 2003
More terms from Larry Reeves (larryr(AT)acm.org), Oct 15 2003

A069668 Largest nontrivial (no trailing zeros) n-digit square with minimum digit sum.

Original entry on oeis.org

1, 25, 121, 2401, 10201, 301401, 1002001, 25010001, 100020001, 2500100001, 10000200001, 250001000001, 1000002000001, 25000010000001, 100000020000001, 2500000100000001, 10000000200000001, 250000001000000001
Offset: 1

Views

Author

Amarnath Murthy, Apr 06 2002

Keywords

Crossrefs

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Oct 15 2003

A069669 Smallest n-digit triangular number with maximum digit sum.

Original entry on oeis.org

6, 78, 496, 8778, 58996, 887778, 5897895, 88877778, 686999778, 9876799878, 89996788896, 777887999778, 7798988788878, 77779987999896, 589598998999878, 7898898998885986, 78999997699698778, 999699998689998991
Offset: 1

Views

Author

Amarnath Murthy, Apr 06 2002

Keywords

Crossrefs

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 15 2003

A069670 Largest n-digit triangular number with maximum digit sum.

Original entry on oeis.org

6, 78, 946, 8778, 58996, 998991, 9979278, 98989485, 886899786, 9998888991, 89996788896, 999998497578, 9869988988965, 99989985868878, 988895779999896, 9999678588989986, 99889886986899778, 999699998689998991
Offset: 1

Views

Author

Amarnath Murthy, Apr 06 2002

Keywords

Crossrefs

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 15 2003
Showing 1-10 of 14 results. Next