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-8 of 8 results.

A092631 Duplicate of A061371.

Original entry on oeis.org

22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75, 77, 222, 225, 232, 235, 237, 252, 253, 255
Offset: 1

Views

Author

Keywords

A001744 Numbers n such that every digit contains a loop (version 2).

Original entry on oeis.org

0, 4, 6, 8, 9, 40, 44, 46, 48, 49, 60, 64, 66, 68, 69, 80, 84, 86, 88, 89, 90, 94, 96, 98, 99, 400, 404, 406, 408, 409, 440, 444, 446, 448, 449, 460, 464, 466, 468, 469, 480, 484, 486, 488, 489, 490, 494, 496, 498, 499, 600, 604, 606, 608, 609, 640, 644, 646
Offset: 1

Views

Author

Keywords

Comments

See A001743 for the other version.
If n-1 is represented as a base-5 number (see A007091) according to n-1 = d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n)= Sum_{j=0..m} c(d(j))*10^j, where c(k)=0,4,6,8,9 for k=0..4. - Hieronymus Fischer, May 30 2012

Examples

			a(1000) = 46999.
a(10^4) = 809999.
a(10^5) = 44499999.
a(10^6) = 668999999.
		

Crossrefs

Programs

  • Mathematica
    FromDigits/@Tuples[{0,4,6,8,9},3] (* Harvey P. Dale, Aug 16 2018 *)
  • PARI
    is(n) = #setintersect(vecsort(digits(n), , 8), [1, 2, 3, 5, 7])==0 \\ Felix Fröhlich, Sep 09 2019

Formula

From Hieronymus Fischer, May 30 2012: (Start)
a(n) = ((2*b_m(n)) mod 8 + 4 + floor(b_m(n)/4) - floor((b_m(n)+1)/4))*10^m + sum_{j=0..m-1} ((2*b_j(n))) mod 10 + 2*floor((b_j(n)+4)/5) - floor((b_j(n)+1)/5) -floor(b_j(n)/5)))*10^j, where n>1, b_j(n)) = floor((n-1-5^m)/5^j), m = floor(log_5(n-1)).
a(1*5^n+1) = 4*10^n.
a(2*5^n+1) = 6*10^n.
a(3*5^n+1) = 8*10^n.
a(4*5^n+1) = 9*10^n.
a(n) = 4*10^log_5(n-1) for n=5^k+1,
a(n) < 4*10^log_5(n-1), otherwise.
a(n) > 10^log_5(n-1) n>1.
a(n) = 4*A007091(n-1), iff the digits of A007091(n-1) are 0 or 1.
G.f.: g(x) = (x/(1-x))*sum_{j>=0} 10^j*x^5^j*(1-x^5^j)*(4 + 6x^5^j + 8(x^2)^5^j + 9(x^3)^5^j)/(1-x^5^(j+1)).
Also: g(x) = (x/(1-x))*(4*h_(5,1)(x) + 2*h_(5,2)(x) + 2*h_(5,3)(x) + h_(5,4)(x) - 9*h_(5,5)(x)), where h_(5,k)(x) = sum_{j>=0} 10^j*(x^5^j)^k/(1-(x^5^j)^5). (End)

Extensions

Ambiguous comment deleted by Zak Seidov, May 25 2010
Examples added by Hieronymus Fischer, May 30 2012

A051416 Primes whose digits are composite; primes having only {4, 6, 8, 9} as digits.

Original entry on oeis.org

89, 449, 499, 4649, 4889, 4969, 4999, 6449, 6469, 6689, 6869, 6899, 6949, 8669, 8689, 8699, 8849, 8969, 8999, 9649, 9689, 9949, 44449, 44699, 46489, 46499, 46649, 46889, 48449, 48649, 48869, 48889, 48989, 49499, 49669, 49999, 64489, 64499, 64849, 64969, 66449
Offset: 1

Views

Author

G. L. Honaker, Jr., Jan 17 2000

Keywords

Comments

Primes formed by using only digits 4, 6, 8, 9. Of course, all the terms of this sequence end with 9. - Bernard Schott, Jan 31 2019

Examples

			89 is the smallest composite-digit prime and also the only composite-digit prime whose digits are distinct. - _Bernard Schott_, Jan 31 2019
		

Crossrefs

Cf. A019546 (with prime digits), A030096 (with odd digits), A061246 (with square digits), A061371 (composite numbers with prime digits).
Subsequence of A061372 and of A152313.

Programs

  • Mathematica
    Select[Prime@Range[6500], Intersection[IntegerDigits[ # ], {0, 1, 2, 3, 5, 7}] == {} & ] (* Ray Chandler, Mar 04 2007 *)
    With[{c = {4, 6, 8, 9}}, Array[Select[Map[FromDigits@ Append[#, 9] &, Tuples[c, {#}]], PrimeQ] &, 4]] // Flatten (* Michael De Vlieger, Feb 02 2019 *)

Extensions

Extended by Ray Chandler, Mar 04 2007

A061372 Primes having only 0,4,6,8,9 as digits.

Original entry on oeis.org

89, 409, 449, 499, 809, 4049, 4099, 4409, 4649, 4889, 4909, 4969, 4999, 6089, 6449, 6469, 6689, 6869, 6899, 6949, 8009, 8069, 8089, 8609, 8669, 8689, 8699, 8849, 8969, 8999, 9049, 9649, 9689, 9949, 40009, 40099, 40499, 40609, 40699, 40849, 40949
Offset: 1

Views

Author

Amarnath Murthy, May 02 2001

Keywords

Comments

Primes having digits that are all 0 or composite.

Examples

			a(5) = 4049 is a prime and 4,0,9 are 0 or composite digits.
		

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Tuples[{0,4,6,8,9},5],PrimeQ] (* Harvey P. Dale, May 04 2011 *)

Extensions

More terms from Erich Friedman, May 08 2001
Definition corrected Dec 05 2006

A387093 Composite numbers that contain only prime digits and whose prime factors contain only prime digits.

Original entry on oeis.org

25, 27, 32, 35, 72, 75, 222, 225, 252, 322, 333, 375, 525, 552, 555, 575, 735, 777, 2352, 2553, 2555, 2775, 3357, 3375, 3552, 3577, 5222, 5352, 5575, 7252, 7322, 23253, 23373, 23532, 23535, 23552, 25275, 25725, 25737, 27232, 27252, 27375, 32352, 32375
Offset: 1

Views

Author

Scott R. Shannon and Ursula Ponting, Aug 16 2025

Keywords

Examples

			25725 is a term as 25725 = 3 * 5^2 * 7^3, and both the number and its prime factors only contain prime digits.
		

Crossrefs

Programs

  • Mathematica
    Select[Select[Range[33000], CompositeQ], And[AllTrue[Union@ IntegerDigits[#], PrimeQ], AllTrue[Union@ Flatten@ Map[IntegerDigits, FactorInteger[#][[All, 1]] ], PrimeQ]] &] (* Michael De Vlieger, Aug 16 2025 *)

A385477 Composite numbers whose digits are odd prime numbers.

Original entry on oeis.org

33, 35, 55, 57, 75, 77, 333, 335, 355, 357, 375, 377, 533, 535, 537, 553, 555, 573, 575, 735, 737, 753, 755, 775, 777, 3333, 3335, 3337, 3353, 3355, 3357, 3375, 3377, 3535, 3537, 3553, 3555, 3573, 3575, 3577, 3735, 3737, 3753, 3755, 3757, 3773, 3775, 3777, 5335, 5337, 5353, 5355, 5357
Offset: 1

Views

Author

Enrique Navarrete, Jun 30 2025

Keywords

Crossrefs

Subsequence of A061371.
Subsequence of A320062.

Programs

  • Maple
    A:=3,5,7: B:= [A]:
    for d from 2 to 4 do B:= map(f,B); A:= A,op(B) od:
    remove(isprime,[A]); # Robert Israel, Jun 30 2025
  • Mathematica
    Select[Range[1, 6000, 2], CompositeQ[#] && AllTrue[IntegerDigits[#], MemberQ[{3, 5, 7}, #1] &] &] (* Amiram Eldar, Jun 30 2025 *)
  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def agen(): yield from (t for d in count(2) for p in product("357", repeat=d) if not isprime(t:=int("".join(p))))
    print(list(islice(agen(), 53))) # Michael S. Branicky, Jun 30 2025

A366826 Composite numbers whose proper substrings (of their decimal expansions) are all primes.

Original entry on oeis.org

4, 6, 8, 9, 22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75, 77, 237, 537, 737
Offset: 1

Views

Author

Kalle Siukola, Oct 25 2023

Keywords

Comments

There are no terms greater than 999 because the only three-digit prime whose substrings are all primes is 373 (see A085823) and prepending or appending any prime digit to it would create a different three-digit substring.

Examples

			237 is included because it is composite and 2, 3, 7, 23 and 37 are all primes.
4 is included because it is composite and has no proper substrings.
		

Crossrefs

Subsequence of A002808.
Cf. A000040.

Programs

  • Python
    from itertools import combinations
    from sympy import isprime
    for n in range(2, 1000):
        if not isprime(n):
            properSubstrings = set(
                int(str(n)[start:end]) for (start, end)
                in combinations(range(len(str(n)) + 1), 2)
            ) - set((n,))
            if all(isprime(s) for s in properSubstrings):
                print(n, end=', ')

A378428 Composites that become prime when any two of their digits are deleted.

Original entry on oeis.org

222, 225, 232, 235, 237, 252, 253, 255, 272, 273, 275, 322, 323, 325, 327, 332, 333, 335, 352, 355, 357, 372, 375, 377, 522, 525, 527, 532, 533, 535, 537, 552, 553, 555, 572, 573, 575, 722, 723, 725, 732, 735, 737, 752, 753, 755, 772, 775, 777, 1111, 1113, 1119, 1131, 1137, 1173, 1179, 1197, 1311, 1317, 1371
Offset: 1

Views

Author

Enrique Navarrete, Nov 26 2024

Keywords

Comments

Any term < 1000 has exactly three digits and all digits are prime (cf. A061371).
The repunits (cf. A002275) R_21, R_25, R_319, R_1033 and R_49083, among others, are in the sequence since R_19, R_23, R_317, R_1031 and R_49081 are prime (cf. A004023).
The corresponding sequence for primes (cf. A378081) contains only 18 terms up to 10^100.

Examples

			1371 is in the sequence since upon deleting any two digits we get 13, 71, 17, 31, 11 and 37, all of which are prime.
1313 is not in the sequence since upon deleting the two 1s we get 33, which is not prime.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n]}, AllTrue[FromDigits /@ Subsets[d, {Length[d] - 2}], PrimeQ]]; Select[Range[100, 1500], CompositeQ[#] && q[#] &] (* Amiram Eldar, Nov 26 2024 *)
  • Python
    from sympy import isprime
    from itertools import combinations as C
    def ok(n):
        if n < 100 or isprime(n): return False
        s = str(n)
        return all(isprime(int(t)) for i, j in C(range(len(s)), 2) if (t:=s[:i]+s[i+1:j]+s[j+1:])!="")
    print([k for k in range(1500) if ok(k)]) # Michael S. Branicky, Nov 26 2024
Showing 1-8 of 8 results.