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

A355773 Numbers all of whose divisors are members of A333369.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 19, 31, 35, 37, 39, 51, 53, 57, 59, 71, 73, 79, 91, 93, 95, 97, 111, 137, 139, 153, 157, 159, 173, 179, 193, 197, 221, 223, 227, 229, 317, 333, 359, 371, 379, 395, 397, 443, 449, 519, 537, 571, 579, 591, 593, 661, 663, 669, 719, 739
Offset: 1

Views

Author

Bernard Schott, Jul 18 2022

Keywords

Comments

All terms are necessarily odd because 2 is not in A333369

Examples

			111 is a term since all the divisors of 111, i.e., 1, 3, 37 and 111, are in A333369.
		

Crossrefs

Similar sequences: A062687, A190217, A329419, A337741
.
Subsequences: A155045, A355853.

Programs

  • Mathematica
    simQ[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; Select[Range[1000], AllTrue[Divisors[#], simQ] &] (* Amiram Eldar, Jul 19 2022 *)
  • PARI
    issimber(m) = my(d=digits(m), s=Set(d)); for (i=1, #s, if (#select(x->(x==s[i]), d) % 2 != (s[i] % 2), return (0))); return (1); \\ A333369
    isok(k) = fordiv(k, d, if (!issimber(d), return(0))); return(1); \\ Michel Marcus, Jul 19 2022
    
  • Python
    from sympy import divisors, isprime
    def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))
    def ok(n): return n > 0 and all(c(d) for d in divisors(n, generator=True))
    print([k for k in range(740) if ok(k)]) # Michael S. Branicky, Jul 24 2022

A323391 Primes containing nonprime digits (from 1 to 9) in their decimal expansion and whose digits are distinct, i.e., consisting of only digits 1, 4, 6, 8, 9.

Original entry on oeis.org

19, 41, 61, 89, 149, 419, 461, 491, 619, 641, 691, 941, 1489, 4691, 4861, 6481, 6491, 6841, 8419, 8461, 8641, 8941, 9461, 14869, 46819, 48619, 49681, 64189, 64891, 68491, 69481, 81649, 84691, 84961, 86491, 98641
Offset: 1

Views

Author

Bernard Schott, Jan 13 2019

Keywords

Comments

There are only 36 terms in this sequence, which is a finite subsequence of A152313.
Two particular examples:
6481 is also the smallest prime formed from the concatenation of two consecutive squares.
81649 is the only prime containing all the nonprime positive digits such that every string of two consecutive digits is a square.

Examples

			14869 is the smallest prime that contains all the nonprime positive digits; 98641 is the largest one.
		

Crossrefs

Subsequence of A152313. Subsequence of A029743. Subsequence of A155024 (with distinct nonprime digits but with 0) and of A034844.
Cf. A029743 (with distinct digits), A124674 (with distinct prime digits), A155045 (with distinct odd digits), A323387 (with distinct square digits), A323578 (with distinct digits for which parity of digits alternates).

Programs

  • Mathematica
    Select[Union@ Flatten@ Map[FromDigits /@ Permutations@ # &, Rest@ Subsets@ {1, 4, 6, 8, 9}], PrimeQ] (* Michael De Vlieger, Jan 19 2019 *)
  • PARI
    isok(p) = isprime(p) && (d=digits(p)) && vecmin(d) && (#Set(d) == #d) && (#select(x->isprime(x), d) == 0); \\ Michel Marcus, Jan 14 2019

A355853 Primes in A333369.

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 31, 37, 53, 59, 71, 73, 79, 97, 137, 139, 157, 173, 179, 193, 197, 223, 227, 229, 317, 359, 379, 397, 443, 449, 571, 593, 661, 719, 739, 751, 881, 883, 887, 937, 953, 971, 1009, 1117, 1151, 1171, 1223, 1229, 1447, 1511, 1579, 1597, 1663, 1667, 1669
Offset: 1

Views

Author

Bernard Schott, Jul 19 2022

Keywords

Examples

			443 is prime and 443 has two 4's and one 3 in its decimal expansion, hence 443 is a term.
		

Crossrefs

Intersection of A000040 and A333369.
Subsequence of A355773.
Supersequence of A155045.
Similar sequences: A002385, A004023.

Programs

  • Mathematica
    simQ[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; Select[Prime[Range[300]], simQ] (* Amiram Eldar, Jul 19 2022 *)
  • PARI
    issimber(m) = my(d=digits(m), s=Set(d)); for (i=1, #s, if (#select(x->(x==s[i]), d) % 2 != (s[i] % 2), return (0))); return (1); \\ A333369
    isok(m) = isprime(m) && issimber(m); \\ Michel Marcus, Jul 19 2022
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A355853_gen(startvalue=1): # generator of terms
        return filter(lambda n:not any((str(n).count(d)^int(d))&1 for d in set(str(n))) and isprime(n),count(max(startvalue,1)))
    A355853_list = list(islice(A355853_gen(),30)) # Chai Wah Wu, Jul 21 2022

Extensions

Extended by Michel Marcus, Jul 19 2022

A323579 Primes formed by using the four terminal digits of multidigit primes and whose digits are distinct, i.e., consisting of only digits 1, 3, 7, 9.

Original entry on oeis.org

3, 7, 13, 17, 19, 31, 37, 71, 73, 79, 97, 137, 139, 173, 179, 193, 197, 317, 379, 397, 719, 739, 937, 971, 1973, 3719, 3917, 7193, 9137, 9173, 9371
Offset: 1

Views

Author

Bernard Schott, Jan 24 2019

Keywords

Comments

There are only 31 terms in this sequence, which is a finite subsequence of A091633 and of A155045.
719 is also the third factorial prime belonging to A055490.

Examples

			1973 and 9371 are respectively the smallest and the largest primes formed with the four digits that can end multidigit primes.
		

Crossrefs

Subsequence of A091633 and hence of A030096.
Cf. A029743 (with distinct digits), A124674 (with distinct prime digits), A155024 (with distinct nonprime digits but with 0), A155045 (with distinct odd digits), A323387 (with distinct square digits), A323391 (with distinct nonprime digits), A323578 (with distinct digits for which parity of digits alternates).

Programs

  • Mathematica
    With[{w = Select[Range@ 10, GCD[#, 10] == 1 &]}, Select[FromDigits /@ Permutations[w, Length@ w], PrimeQ]] (* Michael De Vlieger, Feb 03 2019 *)
    Select[FromDigits/@Flatten[Permutations/@Subsets[{1,3,7,9}],1],PrimeQ]//Union (* Harvey P. Dale, Apr 20 2025 *)
Showing 1-4 of 4 results.