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 31-40 of 49 results. Next

A272107 Absolute primes in base 8: every permutation of digits in base 8 is a prime (only the smallest representatives of the permutation classes are shown).

Original entry on oeis.org

2, 3, 5, 7, 13, 29, 31, 47, 73, 1759
Offset: 1

Views

Author

Chai Wah Wu, Apr 20 2016

Keywords

Comments

Base 8 analog of A258706.

Crossrefs

A309406 Absolute lucky numbers: every permutation of digits is a lucky number.

Original entry on oeis.org

1, 3, 7, 9, 13, 15, 31, 33, 37, 51, 73, 99, 111, 115, 151, 339, 393, 511, 777, 933, 9999, 33333, 55555, 111111, 777777, 7777777, 55555555
Offset: 1

Views

Author

Hauke Löffler, Jul 29 2019

Keywords

Comments

More terms are in A031882, as A031882 is a subset of this sequence.
No more terms below 10^9. - Amiram Eldar, Nov 16 2019

Examples

			a(6) = 15 because 15 and 51 are lucky numbers.
a(14) = 115 because (115, 151, 511) are all lucky numbers.
		

Crossrefs

Extensions

a(25)-a(27) from Amiram Eldar, Nov 16 2019

A317688 Absolute primes that are not repunits: primes where the number resulting from any permutation of the digits is also prime, excluding repunit primes.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 199, 311, 337, 373, 733, 919, 991
Offset: 1

Views

Author

Felix Fröhlich, Aug 04 2018

Keywords

Comments

Any term with two or more digits contains exactly two different digits from the set {1, 3, 7, 9} (cf. Erdős et al., 1977, Solution 953).
Conjecture: The sequence is finite, with 991 being the last term.
The known terms are those terms of A293663 where membership in A293663 trivially implies membership in this sequence, i.e., the numbers resulting from all cyclic permutations of the digits of these terms are the same as the numbers resulting from all permutations of the digits of these terms. This is the case only for terms with less than four digits.

Examples

			The other numbers resulting from all possible permutations of the digits of 113 are 131 and 311. 113, 131 and 311 are all primes, so all three numbers are terms of this sequence.
		

Crossrefs

Relative complement of A004022 in A003459. Supersequence of A129338. Subsequence of A293663.

Programs

  • PARI
    eva(n) = subst(Pol(n), x, 10)
    find_index_a(vec) = my(r=#vec-1); while(1, if(vec[r] < vec[r+1], return(r)); r--; if(r==0, return(-1)))
    find_index_b(r, vec) = my(s=#vec); while(1, if(vec[r] < vec[s], return(s)); s--; if(s==r, return(-1)))
    switch_elements(vec, firstpos, secondpos) = my(g); g=vec[secondpos]; vec[secondpos]=vec[firstpos]; vec[firstpos] = g; vec
    reverse_order(vec, r) = my(v=[], w=[]); for(x=1, r, v=concat(v, vec[x])); for(y=r+1, #vec, w=concat(w, vec[y])); w=Vecrev(w); concat(v, w)
    next_permutation(vec) = my(r=find_index_a(vec)); if(r==-1, return(0), my(s=find_index_b(r, vec)); vec=switch_elements(vec, r, s); vec=reverse_order(vec, r)); vec
    is(n) = if(n < 10, return(1)); my(d=vecsort(digits(n))); if(vecmin(d)==0 || vecmax(d)==1, return(0)); while(1, if(!ispseudoprime(eva(d)), return(0)); d=next_permutation(d); if(d==0, return(1)))
    forprime(p=1, , if(is(p), print1(p, ", ")))

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

Original entry on oeis.org

12, 13, 15, 16, 17, 21, 23, 26, 28, 31, 32, 36, 37, 39, 45, 51, 54, 56, 57, 58, 61, 62, 63, 65, 68, 69, 71, 73, 75, 79, 82, 85, 86, 93, 96, 97, 113, 116, 117, 122, 131, 155, 156, 161, 165, 171, 177, 178, 187, 199, 212, 221, 224, 226, 228, 242, 245, 248, 254, 255, 258, 262, 282
Offset: 1

Views

Author

Metin Sariyar, Jun 05 2022

Keywords

Examples

			156 is a term because omega(156) = omega(165) = omega (516) = omega(561) = omega(615) = omega(651) = 3, where omega(n) is the number of distinct prime divisors of n.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10000],CountDistinct[PrimeNu[FromDigits /@ Permutations[IntegerDigits[#]]]]==1&&CountDistinct[IntegerDigits[#]]>1&]
  • Python
    from sympy import factorint
    from itertools import permutations
    def ok(n):
        s, pf = str(n), len(factorint(n))
        if len(set(s)) == 1: return False
        return all(pf==len(factorint(int("".join(p)))) for p in permutations(s))
    print([k for k in range(500) if ok(k)]) # Michael S. Branicky, Jun 05 2022

A070028 Absolute primes: primes whose initial, all intermediate and final sums of digits are primes.

Original entry on oeis.org

2, 3, 5, 7, 11, 113, 131, 311, 11111111111111111111111
Offset: 1

Views

Author

Rick L. Shepherd, Apr 15 2002

Keywords

Comments

The next terms are R(317) and R(1031) where R(n)=(10^n-1)/9 is a repunit prime. This sequence is a subsequence of A003459 and A070027.

Examples

			113 is a term because 113 and permutations 131 and 311 are prime as is 1+1+3=5. 11111111111111111111111 is a term because it is prime, all permutations of its digits are prime, the sum of its digits, 23, is prime and 2+3=5 is also prime.
		

Crossrefs

Cf. A003459 (absolute primes), A004022 (repunit primes), A070027.

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).

A316787 Semipermutable Primes: One-digit primes and primes with 2 or more digits such that all permutations of their digits are primes except for permutations that place either 5 or even numbers in the units digit.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 107, 113, 131, 149, 181, 199, 223, 227, 229, 241, 251, 277, 281, 283, 311, 337, 373, 401, 419, 421, 443, 449, 457, 461, 463, 467, 491, 503, 509, 521, 547, 557, 563, 569, 577, 587, 601, 607
Offset: 1

Views

Author

Enrique Navarrete, Jul 13 2018

Keywords

Comments

Supersequence of A003459. The motivation of the sequence is to fill gaps in A003459.
The sequence contains all 1-digit primes, 20 2-digit primes (i.e., all 2-digit primes except 19), as opposed to only 9 2-digit primes in A003459, and 66 3-digit primes (as opposed to only 9 3-digit primes in A003459).
Also, the sequence contains 4-digit primes such as 4441 but also nontrivial ones such as 1181, 1811, 8111, which form an orbit of size 3 (see below), while there are no 4-digit primes in A003459.
If we call orbits the primes that can be obtained by such permutations, there are orbits of sizes 1,2,3, and 4 up to 3-digit primes.
In fact, there are only 3 orbits of size 4 up to 3-digit primes: {107, 17, 71, 701}, {149, 419, 491, 941} and {709, 79, 97, 907}.
It appears that there are no orbits of sizes larger than 4 for n-digit primes.
Permutations that have leading 0's are included: thus 409 is not in the sequence because 49 is not prime. - Robert Israel, Aug 31 2018

Examples

			127 is not in the sequence since 271 is prime but neither 217 nor 721 are; to be in the sequence all of these numbers would have to be prime, and they would form an orbit of size 4 (by Name, permutations of these numbers ending in 2 are not considered).
241 and 421 are in the sequence and form an orbit of size 2 since these primes can be obtained by permutations that forbid the units digit to be an even number.
569 and 659 are in the sequence since these primes can be obtained by permutations that forbid the units digit to be either 5 or an even number.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,m,i,t;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10);
      m:=nops(L);
      for i in select(t -> member(L[t],[1,3,7,9]), [$1..m]) do
        for t in combinat:-permute(subsop(i=NULL, L)) do
          if not isprime(L[i]+add(10^j*t[j],j=1..m-1)) then
            return false fi
      od od;
      true
    end proc:
    select(filter, [2,seq(i,i=3..2000,2)]); # Robert Israel, Aug 31 2018
  • Mathematica
    Select[Prime@Range[120], AllTrue[FromDigits /@ Permutations[IntegerDigits@ #], PrimeQ[#] || MemberQ[{0, 2, 4, 5, 6, 8}, Mod[#, 10]] &] &] (* Giovanni Resta, Jul 14 2018 *)

A317689 Largest nonrepunit base-n absolute prime (conjectured).

Original entry on oeis.org

7, 53, 3121, 211, 1999, 3803, 6469, 991, 161047, 19793, 16477, 24907, 683437, 3547, 67853, 80273, 94109, 72421
Offset: 3

Views

Author

Felix Fröhlich, Aug 04 2018

Keywords

Comments

A base-b permutable or absolute prime is a prime p such that all numbers obtained from every permutation of the base-b digits of p and converted to base 10 are prime.
These primes were found using lim=10^8 in the PARI program and match those found with lim=10^5, lim=10^6 and lim=10^7. Therefore I conjecture that they are the correct values for those n.

Crossrefs

Programs

  • PARI
    find_index_a(vec) = my(r=#vec-1); while(1, if(vec[r] < vec[r+1], return(r)); r--; if(r==0, return(-1)))
    find_index_b(r, vec) = my(s=#vec); while(1, if(vec[r] < vec[s], return(s)); s--; if(s==r, return(-1)))
    switch_elements(vec, firstpos, secondpos) = my(g); g=vec[secondpos]; vec[secondpos]=vec[firstpos]; vec[firstpos] = g; vec
    reverse_order(vec, r) = my(v=[], w=[]); for(x=1, r, v=concat(v, vec[x])); for(y=r+1, #vec, w=concat(w, vec[y])); w=Vecrev(w); concat(v, w)
    next_permutation(vec) = my(r=find_index_a(vec)); if(r==-1, return(0), my(s=find_index_b(r, vec)); vec=switch_elements(vec, r, s); vec=reverse_order(vec, r)); vec
    decimal(v, base) = my(w=[]); for(k=0, #v-1, w=concat(w, v[#v-k]*base^k)); sum(i=1, #w, w[i])
    is_absolute_prime(n, base) = my(db=vecsort(digits(n, base))); if(vecmin(db)==0 || vecmax(db)==1, return(0)); while(1, my(dec=decimal(db, base)); if(!ispseudoprime(dec), return(0)); db=next_permutation(db); if(db==0, return(1)))
    a(n) = my(absp=0, lim=10^7, i=0); forprime(p=n+1, , if(is_absolute_prime(p, n), absp=p); i++; if(i==lim, return(absp)))

A343810 Numbers that contain only the digits 0,4,8. Permutable multiples of 4: numbers k such that every permutation of the digits of k is a multiple of 4.

Original entry on oeis.org

0, 4, 8, 40, 44, 48, 80, 84, 88, 400, 404, 408, 440, 444, 448, 480, 484, 488, 800, 804, 808, 840, 844, 848, 880, 884, 888, 4000, 4004, 4008, 4040, 4044, 4048, 4080, 4084, 4088, 4400, 4404, 4408, 4440, 4444, 4448, 4480, 4484, 4488, 4800, 4804
Offset: 0

Views

Author

Ctibor O. Zizka, Apr 30 2021

Keywords

Comments

Also permutable multiples of 4: numbers k such that every permutation of the digits of k is a multiple of 4.

Examples

			480 = 4*120, 408 = 4*102, 840 = 4*210, 804 = 4*201, 048 = 4*12, 084 = 4*21.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,i;
      L:= convert(n,base,3);
      4*add(L[i]*10^(i-1),i=1..nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, Apr 30 2021
  • Mathematica
    FromDigits /@ Tuples[{0, 4, 8}, 4] (* Amiram Eldar, Apr 30 2021 *)
  • PARI
    a(n) = fromdigits(digits(n, 3))*4 \\ Rémy Sigrist, May 05 2021

Formula

a(n) = 4*A007089(n).

A343811 Triangular numbers k such that every permutation of the digits of k is a triangular number.

Original entry on oeis.org

0, 1, 3, 6, 10, 55, 66, 666
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 30 2021

Keywords

Comments

I assume this sequence is finite.
From Jon E. Schoenfield, Mar 05 2022: (Start)
If k is a term of this sequence and is not a repdigit, then at least one of its permutations (a triangular number, call it k1) will have a digit d0 in its ones place and a digit d1 != d0 in its tens place, and the number that results from reversing those last two digits will be a triangular number k2 = k1 + 9*(d0 - d1), so the two distinct triangular numbers k2 and k1 will differ by no more than 9*(9-0) = 81. But the j-th triangular number T(j) differs from the nearest other triangular number by T(j) - T(j-1) = j, so if two distinct triangular numbers T(k1) > T(k2) differ by no more than 81, then k1 <= 81. No triangular numbers <= T(81) = 3321 are terms that exceed 666, so if there exists any term > 666, it is a repdigit triangular number.
However, Ballew and Weger proved (see A045914) that the only repdigit triangular numbers are 0, 1, 3, 6, 55, 66, and 666. Thus, 666 is the last term of this sequence. (End)

Examples

			10 = 4*5/2, 01 = 1*2/2.
		

Crossrefs

Programs

  • Mathematica
    triQ[n_] := IntegerQ @ Sqrt[8*n + 1]; Select[Range[0, 1000], AllTrue[Permutations[ IntegerDigits[#] ], triQ[FromDigits[#1]] &] &] (* Amiram Eldar, Apr 30 2021 *)
    pdtQ[n_]:=AllTrue[FromDigits/@Permutations[IntegerDigits[n]],OddQ[ Sqrt[ 8#+1]]&]; Select[Accumulate[Range[0,5000]],pdtQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 04 2021 *)
Previous Showing 31-40 of 49 results. Next