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 41-50 of 56 results. Next

A255964 Five-digit distinct-digit zeroless primes.

Original entry on oeis.org

12347, 12379, 12437, 12457, 12473, 12479, 12487, 12497, 12539, 12547, 12569, 12583, 12589, 12637, 12647, 12653, 12659, 12689, 12697, 12739, 12743, 12763, 12853, 12893, 12953, 12967, 12973, 12983, 13249, 13259, 13267, 13297, 13457
Offset: 1

Views

Author

Zak Seidov, Mar 12 2015

Keywords

Comments

The last term is a(1610)=98731.
Intersection of A038618 and A074671. - Michel Marcus, Mar 16 2015

Crossrefs

Cf. A038618 (zeroless primes), A074671 (5-digit distinct-digit primes).

Programs

  • Mathematica
    f[n_] := Block[{d = DigitCount@ n}, And[Plus @@ d == 5, Last@ d == 0, Max@ d == 1, PrimeQ@ n]]; Select[Range[10000, 99999], f] (* or *) Select[FromDigits /@ Permutations[Range[1, 9], {5}], PrimeQ] (* Michael De Vlieger, Mar 12 2015 *)

A267277 Zeroless primes p such that p*(product of digits of p)+(sum of digits of p) is also prime.

Original entry on oeis.org

11, 13, 17, 19, 31, 37, 43, 47, 61, 73, 79, 83, 223, 227, 263, 281, 283, 463, 643, 683, 821, 827, 881, 1117, 1231, 1259, 1291, 1321, 1361, 1367, 1433, 1471, 1543, 1567, 1583, 1597, 1619, 1637, 1657, 1699, 1723, 1741, 1753, 1777, 1933, 1951, 1973
Offset: 1

Views

Author

Emre APARI, Jan 12 2016

Keywords

Comments

Zeroless means that the decimal expansion has no digit "0", so no element of A056709 is in the sequence.
If we define a function "n*times products of digits plus sum of digits", f(n) = n*A007954(n) + A007953(n), then iterating the function starting at 217421 generates a chain of at least 4 primes: 217421 -> 24351169 -> 157795575151 -> 1522234189034803183.

Examples

			19 => 19*1*9+1+9 = 181 (is prime).
821 => 821*8*2*1+8+2+1 = 13147 (is prime).
2357 => 2357*2*3*5*7+2+3+5+7 = 494987 (is prime).
99995999 => 99995999*(9^7)*5+9*7+5 = 2391388816705223 (is prime).
		

Crossrefs

Programs

  • Maple
    isA267277 := proc(n)
        local pdgs ;
        if isprime(n) then
            pdgs := A007954(n) ;
            if pdgs <> 0 then
                isprime(n*pdgs+A007953(n)) ;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    for n from 1 to 400 do
        if isA267277(n) then
            printf("%d,\n",n);
        end if;
    end do: # R. J. Mathar, Jan 16 2016
  • Mathematica
    Select[Prime@ Range@ 480, And[Last@ DigitCount@ # == 0, PrimeQ[Function[k, # Times @@ k + Total@ k]@ IntegerDigits@ #]] &] (* Michael De Vlieger, Jan 12 2016 *)

A309566 a(n) is the least prime that can be written as a sequence of primes separated by n single zeros, and where every 0-splitting is prime.

Original entry on oeis.org

307, 130307, 309370307, 30281172370306703
Offset: 1

Views

Author

Michel Marcus, Aug 08 2019

Keywords

Examples

			a(1) = 307 = A309101(1).
130307 is a term since 3, 7, 13, 307, 1303, 130307 are all prime.
		

Crossrefs

Subsequence of A309101.
Cf. A000040 (primes), A038618 (zeroless primes), A056709 (primes with zeros).

Extensions

a(4) from Daniel Suteu and Giovanni Resta, Aug 09 2019

A350574 Primes p such that p, asc(p), and desc(p) are all distinct primes (where asc(p) and desc(p) are the digits of p in ascending and descending order, respectively) and p is the minimum of all permutations of its digits with this property.

Original entry on oeis.org

131, 197, 373, 419, 571, 593, 617, 839, 919, 1297, 1327, 1429, 1879, 1949, 1993, 2129, 2213, 2591, 3539, 4337, 4637, 4639, 5519, 6619, 8389, 8933, 11491, 11519, 11527, 11597, 11897, 11969, 12757, 12829, 12979, 13649, 13879, 14537, 14737, 14741, 14891
Offset: 1

Views

Author

William Riley Barker, Jan 06 2022

Keywords

Comments

All terms in this sequence are zero-free: If p contained 0 as a digit, then desc(p) would end with the zero digit, making it divisible by 10 (thus composite).

Examples

			131 is prime, and so are asc(131) = 113 and desc(131) = 311. Further, these are all distinct primes.
419, asc(419) = 149, and desc(419) = 941 are all distinct primes, and 419 is the smallest permutation of the digits {1,4,9} with this property (149 is not included because asc(149) = 149, so these would not be distinct; 491 is not included because 419 < 491 with the same set of digits).
		

Crossrefs

Cf. A009994.
Subsequence of A038618.

Programs

  • Maple
    d:= n-> convert(n, base, 10):
    g:= (n, r)-> parse(cat(sort(d(n), r)[])):
    f:= n-> (s-> nops(s)=3 and andmap(isprime, s))({n, g(n, `<`), g(n, `>`)}):
    q:= n-> f(n) and n=min(select(f, map(x-> parse(cat(x[])),
            combinat[permute](d(n))))):
    select(q, [$1..15000])[];  # Alois P. Heinz, Jan 15 2022
  • Mathematica
    Select[Prime@Range@2000,AllTrue[FromDigits/@{s=Sort[d=IntegerDigits@#],Reverse@s},PrimeQ]&&Min@Most@Rest@Sort@Select[FromDigits/@Permutations[d],PrimeQ]==#&] (* Giorgos Kalogeropoulos, Jan 16 2022 *)
  • Python
    import numpy as np
    # preliminary functions we will use in building our list
    def is_prime(n):
        for d in range(2,int(np.sqrt(n))+1):
            if n % d == 0:
                return False
        return True
    def asc(n): # returns integer with digits of n in ascending order
        n_list = [int(digit) for digit in str(n)] # separate digits of n into a list
        n_list.sort() # rearrange numbers in ascending order
        asc_n = int(''.join([str(digit) for digit in n_list])) # concatenate the sorted digits
        return asc_n
    def desc(n): # returns integer with digits of n in descending order
        n_list = [int(digit) for digit in str(n)]
        n_list.sort(reverse=True)
        desc_n = int(''.join([str(digit) for digit in n_list]))
        return desc_n
    N = 5
    # get list of integers n such that n, asc(n), and desc(n) are all distinct primes
    condition_1 = [n for n in range(2,10**N)
                   if is_prime(n)
                   and is_prime(asc(n))
                   and is_prime(desc(n))
                   and n not in (asc(n),desc(n))]
    # refine so that our list includes only the minimum permutation of a given set of digits satisfying condition 1
    condition_2 = []
    for num in condition_1:
        if asc(num) not in [asc(n) for n in condition_2]:
            condition_2.append(num)
    print(condition_2)
    
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy import isprime
    from sympy.utilities.iterables import multiset_permutations
    def A350574_gen(): # generator of terms
        for l in count(1):
            rlist = []
            for a in combinations_with_replacement('123456789',l):
                s = ''.join(a)
                p, q = int(s), int(s[::-1])
                if p != q and isprime(p) and isprime(q):
                    for b in multiset_permutations(a):
                        r = int(''.join(b))
                        if p < r < q and isprime(r):
                            rlist.append(r)
                            break
            yield from sorted(rlist)
    A350574_list = list(islice(A350574_gen(),50)) # Chai Wah Wu, Feb 13 2022

A368051 Successive primes building the lexicographically earliest k X k 'Futility Squares' (see the Comment and Example sections for more explanations).

Original entry on oeis.org

13, 31, 113, 101, 313, 1117, 1009, 1019, 7993, 11113, 10007, 10009, 10039, 37997, 111119, 100003, 100019, 100129, 101207, 939973, 1111151, 1000003, 1000033, 1000037, 1000099, 5033981, 1337911, 11111117, 10000019, 10000079, 10000103, 10000121, 10011163, 11702641, 79931311
Offset: 1

Views

Author

Keywords

Comments

A k X k 'Futility Square' is a stack of k primes, each one being of length k. The 1st horizontal prime is also the 1st vertical one; the 2nd horizontal prime is also the 2nd vertical one, and so on. The first horizontal prime must be zeroless. The number on the main diagonal (running from top left to bottom right) is also a prime. The k + 1 primes involved in a k X k square must be distinct and the smallest possible not leading to a contradiction.
There might be more than one k X k 'Futility Square' for some k >= 2. For example another such square for k = 2 is
.
6 7
7 1
. - David A. Corneth, Dec 23 2023

Examples

			Here is the lexicographically earliest 3 X 3 'Futility Square':
.
  1 1 3
  1 0 1
  3 1 3
.
We see that 113, 101, 313 and the diagonal 103 are distinct primes.
Hereunder is the lexicographically earliest 6 X 6 'Futility Square':
.
  1 1 1 1 1 9
  1 0 0 0 0 3
  1 0 0 0 1 9
  1 0 0 1 2 9
  1 0 1 2 0 7
  9 3 9 9 7 3
.
We see that 111119, 100003, 100019, 100129, 101207, 939973 and the diagonal 100103 are distinct primes.
The sequence is formed by the two horizontal primes of the 2 X 2 square [13, 31], then the three horizontal primes of the 3 X 3 square [113, 101, 313], then the four horizontal primes of the 4 X 4 square [1117, 1009, 1019, 7993], etc.
		

Crossrefs

Programs

  • PARI
    \\ See PARI link
    
  • Python
    # See Python link

Extensions

a(28)-a(35) for k=8 from Michael S. Branicky, Dec 23 2023

A385711 Primes whose digits are all distinct and pairwise coprime.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 127, 137, 149, 157, 167, 173, 179, 197, 251, 257, 271, 317, 347, 419, 431, 457, 479, 491, 521, 523, 541, 547, 571, 587, 617, 719, 743, 751, 761, 853, 857, 859, 941, 947, 971, 1237, 1259
Offset: 1

Views

Author

Gonzalo Martínez, Jul 07 2025

Keywords

Comments

This sequence has 252 terms, the last being 95471, which have at most 5 digits. This is because each term has at most one even digit and at most 4 odd digits, since gcd(3, 9) = 3.
All terms are in A038618, since if zero is among the digits of a prime p, then p must have at least 3 digits, where at least one of them is greater than 1, say d, and in such a case gcd(0, d) = d ! = 1.

Examples

			857 is a term since it is prime and gcd(8, 5) = gcd(5, 7) = gcd(8, 7) = 1.
		

Crossrefs

Subsequence of A029743.
Cf. A038618.

Programs

  • Mathematica
    Select[Prime[Range[10000]], UnsameQ @@ (d = IntegerDigits[#]) && AllTrue[Subsets[d, {2}], CoprimeQ @@ # &] &] (* Amiram Eldar, Jul 13 2025 *)

A386321 Primes without {0, 3} as digits.

Original entry on oeis.org

2, 5, 7, 11, 17, 19, 29, 41, 47, 59, 61, 67, 71, 79, 89, 97, 127, 149, 151, 157, 167, 179, 181, 191, 197, 199, 211, 227, 229, 241, 251, 257, 269, 271, 277, 281, 419, 421, 449, 457, 461, 467, 479, 487, 491, 499, 521, 541, 547, 557, 569, 571, 577, 587, 599, 617
Offset: 1

Views

Author

Jason Bard, Jul 19 2025

Keywords

Crossrefs

Intersection of A038611 and A038618.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 4, 5, 6, 7, 8, 9]];
    
  • Mathematica
    Select[Prime[Range[120]], DigitCount[#, 10, 0] == 0 && DigitCount[#, 10, 3] == 0 &]
  • PARI
    primes_with(, 1, [1, 2, 4, 5, 6, 7, 8, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("12456789"), 41))) # uses function/imports in A385776
    

A386322 Primes without {0, 4} as digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 113, 127, 131, 137, 139, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 281, 283, 293, 311, 313, 317, 331, 337
Offset: 1

Views

Author

Jason Bard, Jul 19 2025

Keywords

Crossrefs

Intersection of A038612 and A038618.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 3, 5, 6, 7, 8, 9]];
    
  • Mathematica
    Select[Prime[Range[120]], DigitCount[#, 10, 0] == 0 && DigitCount[#, 10, 4] == 0 &]
  • PARI
    primes_with(, 1, [1, 2, 3, 5, 6, 7, 8, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("12356789"), 41))) # uses function/imports in A385776
    

A386323 Primes without {0, 5} as digits.

Original entry on oeis.org

2, 3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 61, 67, 71, 73, 79, 83, 89, 97, 113, 127, 131, 137, 139, 149, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 263, 269, 271, 277, 281, 283, 293, 311, 313, 317, 331, 337, 347
Offset: 1

Views

Author

Jason Bard, Jul 19 2025

Keywords

Crossrefs

Intersection of A038613 and A038618.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 3, 4, 6, 7, 8, 9]];
    
  • Mathematica
    Select[Prime[Range[120]], DigitCount[#, 10, 0] == 0 && DigitCount[#, 10, 5] == 0 &]
  • PARI
    primes_with(, 1, [1, 2, 3, 4, 6, 7, 8, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("12346789"), 41))) # uses function/imports in A385776
    

A386324 Primes without {0, 6} as digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 71, 73, 79, 83, 89, 97, 113, 127, 131, 137, 139, 149, 151, 157, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 271, 277, 281, 283, 293, 311, 313, 317, 331, 337, 347
Offset: 1

Views

Author

Jason Bard, Jul 19 2025

Keywords

Crossrefs

Intersection of A038614 and A038618.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 3, 4, 5, 7, 8, 9]];
    
  • Mathematica
    Select[Prime[Range[120]], DigitCount[#, 10, 0] == 0 && DigitCount[#, 10, 6] == 0 &]
  • PARI
    primes_with(, 1, [1, 2, 3, 4, 5, 7, 8, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("12345789"), 41))) # uses function/imports in A385776
    
Previous Showing 41-50 of 56 results. Next