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-60 of 119 results. Next

A337208 Indices m of repunits R_m that are Colombian (or self) numbers.

Original entry on oeis.org

1, 4, 6, 17, 28, 39, 50, 61, 72, 83, 94, 109, 120, 131, 142, 153, 164, 175, 186, 197, 199, 210, 221, 232, 243, 254, 265, 276, 287, 298, 300, 311, 322, 333, 344, 355, 366, 377, 388, 399, 401, 412, 423, 434, 445, 456, 467, 478, 489, 500, 502, 513, 524, 535, 546, 557
Offset: 1

Views

Author

David A. Corneth, Aug 19 2020

Keywords

Crossrefs

Cf. A002275 (repunits), A003052 (Colombian (or self)), A004022 (repunit primes), A004023 (indices of repunit primes), complement of A337139.

Programs

  • PARI
    upto(n)= {my(res = List()); for(i = 1, n, if(is(i), listput(res, i); print1(i", "))); res}
    is(n) = {c = 10^n \ 9; is_A003052(c)}
    is_A003052(n)={for(i=1, min(n\2, 9*#digits(n)), sumdigits(n-i)==i && return); n} \\ from M. F. Hasler, Mar 20 2011

A337941 Numbers whose divisors are all Zuckerman numbers (A007602).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 24, 1111111111111111111, 11111111111111111111111
Offset: 1

Views

Author

Bernard Schott, Oct 01 2020

Keywords

Comments

Inspired by A337741.
Zuckerman numbers are numbers that are divisible by the product of their digits (see link).
The next term is the repunit prime R_317 which is too large to include in the data.
Primes in this sequence are 2, 3, 5, 7 and all the repunit primes (see A004023).
This sequence is infinite if and only if there are infinitely many repunit primes.

Examples

			6 is a term since all the divisors of 6, i.e., 1, 2, 3 and 6, are Zuckerman numbers.
		

Crossrefs

Subsequence of A007602.
Similar sequences: A062687, A190217, A308851, A329419, A337741.
Cf. A004022 (subsequence of prime repunits).

Programs

  • Mathematica
    zuckQ[n_] := (prod = Times @@ IntegerDigits[n]) > 0 && Divisible[n, prod]; Select[Range[24], AllTrue[Divisors[#], zuckQ] &] (* Amiram Eldar, Oct 01 2020 *)
  • PARI
    isok(m) = {fordiv(m, d, my(p=vecprod(digits(d))); if (!p || (d % p), return (0))); return (1);} \\ Michel Marcus, Oct 05 2020

A344637 a(n) is the smallest k > 0 such that the number that results from inserting a string of k zeros between all adjacent digits of prime(n) is also prime, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 30, 1, 1
Offset: 5

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Comments

Is a(26) = 0? Note that prime(26) = 101 and 101 is the largest known prime of the form 10^t + 1.
a(A000720(A004022(i))) = 0 for i > 1, i.e., a(n) = 0 if prime(n) is a repunit > 11.

Examples

			For n = 10: prime(10) = 29 and 200009 is the smallest prime obtained by inserting a string of zeros between all adjacent digits, so a(10) = 4.
		

Crossrefs

Programs

  • PARI
    eva(n) = subst(Pol(n), x, 10)
    insert_zeros(num, len) = my(d=digits(num), v=[]); for(k=1, #d-1, v=concat(v, concat([d[k]], vector(len)))); v=concat(v, d[#d]); eva(v)
    a(n) = my(p=prime(n)); for(k=1, oo, if(ispseudoprime(insert_zeros(p, k)), return(k)))

A374238 Primes whose pattern of identical digits is unique among the primes.

Original entry on oeis.org

11, 3333311, 7771717, 11818181, 515115551, 727722727, 887887787, 1110011101, 1161611161, 1411111441, 1411141411, 1717117117, 1911999919, 3311113111, 3313133311, 3333353533, 5151111551, 5555115151, 5777777557, 7373733337, 7747447777, 7777111777, 8887788787, 9199119991, 9994449499
Offset: 1

Views

Author

Dmytro Inosov, Jul 01 2024

Keywords

Comments

The digit pattern for any natural number n is uniquely defined by the canonical form A358497(n), which enumerates digits according to their position of first occurrence. Each prime in this sequence has a unique digit pattern in the sense that no other prime has the same pattern.
Prime repunits (A004022) are a subsequence, as they are the sole primes with a single distinct digit.
A cryptarithm (alphametic) expresses a digit pattern in letters, where each distinct letter is to map to a distinct digit.
If a cryptarithmetic problem calls for a prime number, then the primes in this sequence are unique solutions, so we call these primes cryptarithmically unique.
The smallest term with 3 distinct digits is 1151135331533311.
The number of terms of length n is given by A376084(n).

Examples

			11 is a term since no other prime has the same pattern "AA" of two identical digits (any other AA is divisible by A > 1, hence nonprime).
Counterexample: 13 is not a term since another prime 17 has the same pattern "AB" of two nonidentical digits.
7771717 is a term since it's prime and no other prime has the same pattern "AAABABA".
		

Crossrefs

Cf. A000040 (primes), A004022 (prime repunits), A358497, A039986, A376918, A376084, A376118.

Programs

  • Mathematica
    NumOfDigits = 10; (*Maximal integer length to be searched for*)
    A358497[k_] :=
      FromDigits[
       Table[Mod[
         CountDistinct[Take[#, FirstPosition[#, #[[i]]][[1]]]] &[
          IntegerDigits[k]], 10], {i, 1, IntegerLength[k]}]];
    A006880[MaxLen_] := PrimePi[10^MaxLen];
    Extract[Select[
       Tally[Table[{#, A358497[#]} &[Prime[i]], {i, 1,
           A006880[NumOfDigits]}], #1[[2]] == #2[[2]] &], #[[2]] == 1 &], {All, 1}]

A057630 Primes such that replacing each digit d with d copies of the digit d produces a prime. Zeros are allowed.

Original entry on oeis.org

11, 31, 53, 101, 131, 149, 223, 283, 311, 313, 331, 397, 463, 503, 641, 691, 937, 941, 1031, 1049, 1069, 1301, 1409, 1439, 1511, 1609, 1741, 1871, 1949, 1993, 1999, 2083, 2111, 2203, 2447, 2803, 2939, 3001, 3011, 3061, 3163, 3301, 3391, 3433, 3499, 3559
Offset: 1

Views

Author

G. L. Honaker, Jr., Oct 10 2000

Keywords

Comments

"Replacing each digit d with d copies of the digit d" is the function A048376, well defined on the set of positive integers. Therefore (the range of) the present sequence is the largest subset of A000040 stable under the operation A048376.
A004022 is a subsequence. - Chai Wah Wu, Dec 19 2019

Examples

			E.g. 641 becomes 66666644441 which is also prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[FromDigits[Flatten[Table[#,{#}]&/@ IntegerDigits[ #]]]]&]  (* Harvey P. Dale, Dec 18 2010 *)
  • PARI
    is_A057630(n)={isprime(A048376(n)) && isprime(n)} \\ M. F. Hasler, Jan 23 2013
    
  • Python
    from sympy import isprime, nextprime
    A057630_list, dlist, p = [], [str(d)*d for d in range(10)], 2
    while len(A057630_list) < 10000:
        if isprime(int(''.join(dlist[int(d)] for d in str(p)))):
            A057630_list.append(p)
        p = nextprime(p) # Chai Wah Wu, Dec 19 2019, corrected Jan 01 2022

Extensions

More terms from Patrick De Geest, Oct 15 2000
Offset changed to 1, according to OEIS conventions, by M. F. Hasler, Jan 23 2013

A086244 Primes such that a sum of any two adjacent digits is prime; first and last digits are considered adjacent.

Original entry on oeis.org

11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 211, 2029, 2111, 2129, 2141, 2143, 2161, 2341, 2383, 2389, 2503, 2521, 4111, 4129, 4349, 4703, 4943, 6121, 6521, 6761, 8329, 8389, 8923, 8929, 11161, 11411, 12161, 12941, 14321, 14341, 14741, 16111, 16141, 16561, 16741, 20323, 20341, 20389, 20521
Offset: 1

Views

Author

Zak Seidov, Jul 13 2003

Keywords

Comments

Each (2- or more-digit) term must begin with one of the even digits 2,4,6,8 or else must begin and end with the digit 1. All repunit primes (A004022) are terms as the sums are always 2.

Examples

			2029 is a term because it is a prime and 2+0, 0+2, 2+9, 9+2 are all primes.
		

Programs

  • Mathematica
    p=10; Reap[Do[Label[ne]; p=NextPrime[p]; id=IntegerDigits[p];
       id1=Append[id,id[[1]]];id2=Prepend[id,id[[-1]]];
       If[{True}==Union[PrimeQ[id1+id2]],Sow[p]], {2000}]][[2, 1]]
    (* Zak Seidov, May 10 2016 *)
    tadpQ[n_]:=Module[{idn=IntegerDigits[n]},AllTrue[ Join[{idn[[1]]+ idn[[-1]]}, Total/@Partition[idn,2,1]],PrimeQ]]; Select[Prime[Range[ 2500]],tadpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 08 2019 *)

Extensions

Corrected and extended by Rick L. Shepherd, Feb 11 2004

A091939 Prime numbers with prime sum of any two digits.

Original entry on oeis.org

11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 211, 2111, 4111, 11161, 11411, 16111, 111121, 111211, 111611, 112111, 611111, 1111211, 1114111, 11111141, 11111161, 11141111, 61111111, 1111111121, 1111111411, 1111211111, 1111411111, 1121111111
Offset: 1

Views

Author

Rick L. Shepherd, Feb 16 2004

Keywords

Comments

All repunit primes (A004022) are terms. All other terms contain exactly one nonzero even digit. All non-repunit terms with k>2 digits must contain exactly k-1 copies of the digit 1, including final digit 1 and the remaining digit must be either 2, 4, or 6.
a(3330) has 1001 digits. - Michael S. Branicky, Dec 13 2023

Examples

			2111 is a term because it is prime and all sums of any two of its digits are 2+1 = 3 or 1+1 = 2, both of which are primes.
		

Crossrefs

Cf. A004022 (repunit primes).

Programs

  • Python
    from gmpy2 import is_prime
    from itertools import count, islice
    def agen(): # generator of terms
        yield from [11, 23, 29, 41, 43, 47, 61, 67, 83, 89]
        for k in count(3):
            b = (10**k-1)//9
            if is_prime(b): yield b
            dlst = [j for j in [1, 3, 5] if (k+j)%3]
            for i in range(1, k):
                c = 10**i
                for d in dlst:
                    if is_prime(b + c*d): yield b + c*d
    print(list(islice(agen(), 32))) # Michael S. Branicky, Dec 13 2023

A147555 Smallest prime factor of prime(n)-th repunit number.

Original entry on oeis.org

11, 3, 41, 239, 21649, 53, 2071723, 1111111111111111111, 11111111111111111111111, 3191, 2791, 2028119, 83, 173, 35121409, 107, 2559647034361, 733, 493121, 241573142393627673576957439049, 12171337159
Offset: 1

Views

Author

Farideh Firoozbakht, Dec 26 2008

Keywords

Comments

The sequence of repunit primes is a subsequence of this sequence.

Examples

			prime(15)=47 and (10^47-1)/9 = 35121409*316362908763458525001406154038726382279, so a(15)=35121409.
		

Crossrefs

Formula

a(n) = A067063(A000040(n)) = A020639(A002275(A000040(n))) = A020639(A019328(A000040(n))). - Ray Chandler, May 11 2017

Extensions

Edited by Ray Chandler, Apr 06 2011

A167847 Straight-line primes.

Original entry on oeis.org

11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 4567, 76543, 23456789, 1111111111111111111, 11111111111111111111111
Offset: 1

Views

Author

Omar E. Pol, Nov 14 2009

Keywords

Comments

Prime numbers with 2 digits together with the primes whose digits are in arithmetic progression. The structure of digits represents a straight line.
Note that in the graphic representation the points are connected by imaginary line segments (see also A135643).
Note that all two-digit primes are straight-line primes but this sequence has no three-digit terms.
No further terms between 23456789 and 115507867=prime(6600000). - R. J. Mathar, Dec 04 2009
All terms after 23456789 are repunit primes (A004022) with number of digits: 19, 23, 317, 1031, 49081, 86453, 109297, 270343, ... (A004023). - Jens Kruse Andersen, Jul 21 2014

Examples

			The number 4567 is straight-line prime:
  . . . .
  . . . .
  . . . 7
  . . 6 .
  . 5 . .
  4 . . .
  . . . .
  . . . .
  . . . .
  . . . .
		

Crossrefs

Extensions

2 more terms from R. J. Mathar, Dec 04 2009
a(25)-a(26) from Jens Kruse Andersen, Jul 21 2014

A171268 Primes q such that q^p ends with q, where p is the product of the digits of q.

Original entry on oeis.org

5, 11, 37, 61, 73, 199, 751, 3761, 7993, 79193, 7799999, 1111111111111111111, 11111111111111111111111, 199999999999999999999999999
Offset: 1

Views

Author

Farideh Firoozbakht, Apr 28 2010

Keywords

Comments

All repunit primes (A004022) are in the sequence.
Number 2*10^k-1 is a term whenever k is an even term of A002957. - Max Alekseyev, Jun 08 2018
a(15) = 38*10^152-1, a(16) = 2*10^236-1, a(17) = 2*10^248-1, a(18) = (10^317-1)/9, a(19) = 38*10^352-1, a(20) = 2*10^386-1, a(21) = 78*10^535-1, a(22) = 2*10^546-1 are too large to include here. - Max Alekseyev, Jun 26 2018

Examples

			7799999^(7*7*9*9*9*9*9) == 7799999 (mod 10^7), so 7799999 is a term.
		

Crossrefs

Programs

  • Mathematica
    Do[n=Prime[m];a=IntegerDigits[n];If[PowerMod[n,Apply[Times,a],10^Length[a]]==n,Print[n]],{m,100000000}]

Extensions

a(12)-a(14) from Max Alekseyev, Aug 18 2013
Previous Showing 51-60 of 119 results. Next