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

A067013 Numbers with property that every permutation of digits (dropping any leading zeros) is 1 or a composite number.

Original entry on oeis.org

1, 4, 6, 8, 9, 10, 12, 15, 18, 21, 22, 24, 25, 26, 27, 28, 33, 36, 39, 40, 42, 44, 45, 46, 48, 49, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 72, 75, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 93, 94, 96, 99, 100, 102, 105, 108, 111, 114, 116, 117, 120, 122
Offset: 1

Views

Author

Lior Manor, Dec 26 2001

Keywords

Examples

			10 is a term since 10 is not a prime number and the permutation (0)1 is not a prime number either.
		

Crossrefs

Subsequence of A248010.
Cf. A067012.

Programs

  • Mathematica
    t={};Do[l1=Table[FromDigits[k],{k,Permutations[IntegerDigits[n]]}]; If[Select[l1,PrimeQ]=={},AppendTo[t,n]],{n,122}];t (* Jayanta Basu, May 03 2013 *)

A287198 Numbers with the property that every cyclic permutation of its digits is a composite number with none of its permutations sharing any common prime factors.

Original entry on oeis.org

4, 6, 8, 9, 25, 49, 52, 56, 58, 65, 85, 94, 116, 134, 145, 158, 161, 178, 187, 253, 275, 295, 325, 341, 358, 413, 451, 514, 527, 529, 532, 581, 583, 589, 611, 718, 752, 781, 815, 817, 835, 871, 895, 899, 952, 958, 989, 998, 1154, 1156, 1159, 1165, 1189, 1192
Offset: 1

Views

Author

Luke Zieroth, May 21 2017

Keywords

Comments

Subsequence of A052382, as a number with a zero digit have cyclic permutations of the forms 0x and x0 which share prime factors of x. The only exception to this argument is 10, but 01 is not composite, so 10 is not a member of the sequence as well. - Chai Wah Wu, May 24 2017
If m is a multiple of 11 with an even number of digits, then m is not a term. - Chai Wah Wu, May 30 2017

Examples

			The numbers formed by cyclic permutations of 134 are 341 and 413. The factors of 134 are 2 and 67, the factors of 341 are 11 and 31, and the factors of 413 are 7 and 59. Since these numbers are all composite and none share any common factors with each other, 134 is included on the list.
		

Crossrefs

Programs

  • Mathematica
    ok[n_] := Catch@ Block[{t = FromDigits /@ (RotateLeft[IntegerDigits[n], #] & /@ Range[ IntegerLength@ n])}, If[! AllTrue[t, CompositeQ], Throw@False]; Do[ If[ GCD[t[[i]], t[[j]]] > 1, Throw@False], {i, Length@t}, {j, i-1}]; True]; Select[ Range@ 1200, ok] (* Giovanni Resta, May 25 2017 *)
  • PARI
    is(n) = {my(d=digits(n), v=vector(#d)); v[1]=n; if(isprime(n)||n==10, return(0)); for(i=2, #d, v[i] = v[i-1]\10; v[i] = v[i]+(v[i-1]-v[i]*10)*10^(#d-1); if(isprime(v[i]), return(0)); for(j=1,i-1,if(gcd(v[j], v[i])>1, return(0)))); n>1} \\ David A. Corneth, May 25 2017
    
  • Python
    from gmpy2 import is_prime, gcd, mpz
    A287198_list, n  = [], 2
    while n <= 10**6:
        s = str(n)
        if not is_prime(n) and '0' not in s:
            k = n
            for i in range(len(s)-1):
                s = s[1:]+s[0]
                m = mpz(s)
                if is_prime(m) or gcd(k,m) > 1:
                    break
                k *= m
            else:
                A287198_list.append(n)
        n += 1 # Chai Wah Wu, May 27 2017

A091897 Numbers that remain prime or composite for all permutations of their digits.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 15, 17, 18, 21, 22, 24, 25, 26, 27, 28, 31, 33, 36, 37, 39, 40, 42, 44, 45, 46, 48, 49, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 71, 72, 73, 75, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88, 90, 93, 94, 96, 97, 99, 102, 105
Offset: 1

Views

Author

Rick L. Shepherd, Feb 09 2004

Keywords

Comments

Union of A003459 and A067012. The repdigit numbers (A010785) > 1 are also clearly a subsequence.

Crossrefs

Cf. A003459 (absolute primes), A067012 ('absolute composites'), A091898 (complement of A091897), A010785 (repdigit numbers).

A248010 Non-primatic permutable numbers: All permutations of the number's digits except the ones resulting in leading zeros are nonprimes.

Original entry on oeis.org

1, 4, 6, 8, 9, 10, 12, 15, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 33, 36, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 75, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 93, 94, 96, 99, 100, 102, 105, 108, 111, 114, 116, 117, 120, 122, 123, 126, 129, 132, 135, 138, 141, 144, 147
Offset: 1

Views

Author

Andreas Boe, Sep 29 2014

Keywords

Comments

This sequence differs slightly from "absolute composite numbers". 30 is not an absolute composite since 03 is counted as a prime, but in this sequence permutations with leading zeros are disqualified as viable permutations.

Examples

			7000 qualifies since it is a composite and the only allowed permutation of its four digits.
		

Crossrefs

Absolute composites: A067012, A067013.
Monoprimatic permutable numbers: A245808.
Biprimatic permutable numbers: A246043.

A091898 Numbers that change from composite to prime or vice versa for at least one permutation of their digits.

Original entry on oeis.org

14, 16, 19, 20, 23, 29, 30, 32, 34, 35, 38, 41, 43, 47, 50, 53, 59, 61, 67, 70, 74, 76, 83, 89, 91, 92, 95, 98, 101, 103, 104, 106, 107, 109, 110, 112, 115, 118, 119, 121, 124, 125, 127, 128, 130, 133, 134, 136, 137, 139, 140, 142, 143, 145, 146, 149, 151, 152, 154
Offset: 1

Views

Author

Rick L. Shepherd, Feb 09 2004

Keywords

Comments

This is actually a subsequence of the complement of A091897, the union of A003459 and A067012: This sequence contains no powers of 10 (A011557) as 1 is not prime.
Clearly also no repdigit number (A010785) is a term nor is any number with only even digits (except for 20,200,2000,...) nor is any number divisible by 3 (except for 30,300,3000,...). Among other primes, this sequence does include all primes p > 5 which contain at least one of the digits 0,2,4,5,6,8.

Examples

			14=2*7 (composite) is a term as a permutation of its digits gives 41 (prime).
Hence 41 is also a term. 19 (prime) is a term as 91=7*13 (composite). Thus 91
is also a term. 130=2*5*13 (composite) is a term (even though the permutation
310=2*5*31 is also composite) because another permutation (0)13 (prime) exists
(dropping the leading 0). 13, however, is not a term as 31 is also prime (13
and 31 are members of A003459).
		

Crossrefs

Cf. A003459 (absolute primes), A067012 ('absolute composites'), A091897 (union of A003459 and A067012), A010785 (repdigit numbers).

A354745 Non-repdigit numbers k such that every permutation of the digits of k has the same number of divisors.

Original entry on oeis.org

13, 15, 17, 24, 26, 31, 37, 39, 42, 51, 58, 62, 71, 73, 79, 85, 93, 97, 113, 117, 131, 155, 171, 177, 178, 187, 199, 226, 262, 288, 311, 337, 339, 355, 373, 393, 515, 535, 551, 553, 558, 585, 622, 711, 717, 718, 733, 771, 781, 817, 828, 855, 871, 882, 899, 919, 933, 989, 991, 998
Offset: 1

Views

Author

Metin Sariyar, Jun 05 2022

Keywords

Comments

After a(93) = 84444, no further terms < 10^18. - Michael S. Branicky, Jun 08 2022

Examples

			871 is a term because d(871) = d(817) = d(178) = d(187) = d(718) = d(781) = 4, where d(n) is the number of divisors of n.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10000],CountDistinct[DivisorSigma[0,FromDigits /@ Permutations[IntegerDigits[#]]]]==1&&CountDistinct[IntegerDigits[#]]>1&]
  • Python
    from sympy import divisor_count
    from itertools import permutations
    def ok(n):
        s, d = str(n), divisor_count(n)
        if len(set(s)) == 1: return False
        return all(d==divisor_count(int("".join(p))) for p in permutations(s))
    print([k for k in range(5500) if ok(k)]) # Michael S. Branicky, Jun 05 2022
Showing 1-6 of 6 results.