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

A001742 Numbers whose digits contain no loops (version 2).

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 12, 13, 15, 17, 21, 22, 23, 25, 27, 31, 32, 33, 35, 37, 51, 52, 53, 55, 57, 71, 72, 73, 75, 77, 111, 112, 113, 115, 117, 121, 122, 123, 125, 127, 131, 132, 133, 135, 137, 151, 152, 153, 155, 157, 171, 172, 173, 175, 177, 211, 212, 213, 215
Offset: 1

Views

Author

Keywords

Comments

Numbers all of whose decimal digits are in {1,2,3,5,7}.
If n is represented as a zerofree base-5 number (see A084545) according to n = 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)=1,2,3,5,7 for k=1..5. - Hieronymus Fischer, May 30 2012

Examples

			From _Hieronymus Fischer_, May 30 2012: (Start)
a(10^3) = 12557.
a(10^4) = 275557.
a(10^5) = 11155557.
a(10^6) = 223555557. (End)
		

Crossrefs

Cf. A001729 (version 1), A190222 (noncomposite terms), A190223 (n with all divisors in this sequence).

Programs

  • Magma
    [n: n in [1..500] |  Set(Intseq(n)) subset [1, 2, 3, 5, 7]]; // Vincenzo Librandi, Dec 17 2018
  • Mathematica
    nlQ[n_]:=And@@(MemberQ[{1,2,3,5,7},#]&/@IntegerDigits[n]); Select[Range[ 160],nlQ] (* Harvey P. Dale, Mar 23 2012 *)
    Table[FromDigits/@Tuples[{1, 2, 3, 5, 7}, n], {n, 3}] // Flatten (* Vincenzo Librandi, Dec 17 2018 *)
  • Perl
    for (my $k = 1; $k < 1000; $k++) {print "$k, " if ($k =~ m/^[12357]+$/)} # Charles R Greathouse IV, Jun 10 2011
    

Formula

From Hieronymus Fischer, May 30 2012: (Start)
a(n) = Sum_{j=0..m-1} ((2*b_j(n)+1) mod 10 + 2*floor(b_j(n)/5) - floor((b_j(n)+3)/5) - floor((b_j(n)+4)/5))*10^j, where b_j(n) = floor((4*n+1-5^m)/(4*5^j)), m = floor(log_5(4*n+1)).
a(1*(5^n-1)/4) = 1*(10^n-1)/9.
a(2*(5^n-1)/4) = 2*(10^n-1)/9.
a(3*(5^n-1)/4) = 1*(10^n-1)/3.
a(4*(5^n-1)/4) = 5*(10^n-1)/9.
a(5*(5^n-1)/4) = 7*(10^n-1)/9.
a(n) = (10^log_5(4*n+1)-1)/9 for n=(5^k-1)/4, k > 0.
a(n) < (10^log_5(4*n+1)-1)/9 for (5^k-1)/4 < n < (5^(k+1)-1)/4, k > 0.
a(n) <= A202268(n), equality holds for n=(5^k-1)/4, k > 0.
a(n) = A084545(n) iff all digits of A084545(n) are <= 3, a(n) > A084545(n), otherwise.
G.f.: g(x) = (x^(1/4)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(5/4)*(1 + z(j) + z(j)^2 + 2*z(j)^3 + 2*z(j)^4 - 7*z(j)^5)/(1-z(j)^5), where z(j) = x^5^j.
Also g(x) = (x^(1/4)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(5/4)*(1-z(j))*(1 + 2z(j) + 3*z(j)^2 + 5*z(j)^3 + 7*z(j)^4)/(1-z(j)^5), where z(j) = x^5^j.
Also: g(x)=(1/(1-x))*(h_(5,0)(x) + h_(5,1)(x) + h_(5,2)(x) + 2*h_(5,3)(x) + 2*h_(5,4)(x) - 7*h_(5,5)(x)), where h_(5,k)(x) = Sum_{j>=0} 10^j*x^((5^(j+1)-1)/4)*(x^5^j)^k/(1-(x^5^j)^5). (End)
Sum_{n>=1} 1/a(n) = 3.961674246441345455010500439753914974057344229353697593567607096540565407371... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024

A386086 Primes having only {1, 2, 3, 5} as digits.

Original entry on oeis.org

2, 3, 5, 11, 13, 23, 31, 53, 113, 131, 151, 211, 223, 233, 251, 311, 313, 331, 353, 521, 523, 1123, 1151, 1153, 1213, 1223, 1231, 1321, 1511, 1523, 1531, 1553, 2111, 2113, 2131, 2153, 2213, 2221, 2251, 2311, 2333, 2351, 2521, 2531, 2551, 3121, 3221, 3251, 3253
Offset: 1

Views

Author

Jason Bard, Jul 16 2025

Keywords

Crossrefs

Subsequence of A190222.
Supersequence of A062350, A214703, A385773.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 3, 5]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 3, 5}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [1, 2, 3, 5]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("1235"), 41))) # uses function/imports in A385776
    

A261449 Prime numbers whose decimal digits contain a total of two loops.

Original entry on oeis.org

83, 109, 149, 181, 199, 269, 281, 283, 349, 383, 401, 419, 439, 443, 461, 463, 467, 479, 491, 509, 569, 587, 599, 601, 607, 619, 641, 643, 647, 659, 661, 691, 709, 769, 787, 811, 821, 823, 827, 853, 857, 877, 907, 919, 929, 941, 947, 967, 991, 997, 1019, 1039
Offset: 1

Views

Author

Altug Alkan, Aug 19 2015

Keywords

Comments

Of the digits, 0 through 9, {0, 4, 6, 9} have one loop, 8 has two loops, and all the rest have none. - Robert G. Wilson v, Aug 20 2015

Examples

			83 is the first term of the sequence. The digit 8 contains two closed curves.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 200, 2 == Total[{ 1,0, 0,0, 1,0, 1,0, 2,1}[[1 + IntegerDigits@ #]]]&] (* Giovanni Resta, Aug 19 2015 *)

Extensions

More terms from Giovanni Resta, Aug 19 2015
Showing 1-3 of 3 results.