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

A326953 a(n) = A001222(A028906(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 5, 3, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 3, 1, 3, 3, 3, 4, 1, 2, 1, 2, 3, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 3, 3, 2, 3, 3, 1, 1, 5, 4, 3, 2, 3, 1, 7, 3, 3, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 1, 2, 1, 5, 3, 1, 1, 3, 2, 3, 1, 3, 3, 4, 1, 4, 1
Offset: 1

Views

Author

Joshua Michael McAteer, Aug 06 2019

Keywords

Comments

Multiplicity of prime divisors of n, where n is a number composed of the reverse sorted digits of a prime number.
Conjecture: the sum of the first n terms of A326953 (largest to smallest sorting) is >= the sum of the first n terms of A326952 (smallest to largest sorting). This is true for the first 9592 terms.

Examples

			The 28th prime number is 107. The reverse sorted digits are 710. The factorization of 710 is 2, 5, 71, therefore the 28th term in this sequence is 3.
		

Crossrefs

Cf. A001222 (bigomega), A028906, A326952 (for ascending sorted version).

Programs

  • MATLAB
    nmax= 100;
    p = primes(nmax);
    lp = length(p);
    lfac = zeros(1, lp);
    for i = 1:lp
    digp=str2double(regexp(num2str(p(i)), '\d', 'match'));
    ldigp = flip(sort(digp));
    l=length(digp);
    conv = 10.^flip(0:(l-1));
    lnum = sum(conv.*ldigp);
    lfac(i) = numel(factor(lnum));
    end

A028911 Sort digits of primes into descending order (A028906) then sort this sequence into ascending order.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 31, 32, 41, 43, 53, 61, 71, 71, 73, 73, 74, 76, 83, 91, 92, 95, 97, 97, 98, 110, 211, 310, 311, 311, 311, 322, 331, 331, 332, 410, 421, 421, 431, 433, 443, 511, 521, 521, 530, 532, 533, 541, 610, 631, 631, 631, 632, 641, 641, 643, 643, 653
Offset: 0

Views

Author

Keywords

Programs

  • Mathematica
    Take[Sort[FromDigits[Reverse[Sort[IntegerDigits[#]]]]&/@Prime[Range[200]]],60] (* Harvey P. Dale, Mar 26 2013 *)

Extensions

More terms from Erich Friedman.

A028912 Sort digits of primes into descending order (A028906), sort this sequence into ascending order (A028911), then remove duplicates.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 32, 41, 43, 53, 61, 71, 73, 74, 76, 83, 91, 92, 95, 97, 98, 110, 211, 310, 311, 322, 331, 332, 410, 421, 431, 433, 443, 511, 521, 530, 532, 533, 541, 610, 631, 632, 641, 643, 653, 661, 710, 721, 722, 730, 731, 733, 743, 751, 752, 754, 755
Offset: 0

Views

Author

Keywords

Programs

  • Mathematica
    Take[FromDigits[Reverse[Sort[IntegerDigits[#]]]]&/@Prime[Range[200]]//Union,60] (* Harvey P. Dale, Mar 31 2018 *)

Extensions

More terms from Erich Friedman.

A069567 Smaller of two consecutive primes which are anagrams of each other.

Original entry on oeis.org

1913, 18379, 19013, 25013, 34613, 35617, 35879, 36979, 37379, 37813, 40013, 40213, 40639, 45613, 48091, 49279, 51613, 55313, 56179, 56713, 58613, 63079, 63179, 64091, 65479, 66413, 74779, 75913, 76213, 76579, 76679, 85313, 88379, 90379, 90679, 93113, 94379, 96079
Offset: 1

Views

Author

Amarnath Murthy, Mar 24 2002

Keywords

Comments

Smaller members of Ormiston prime pairs.
Given the n-th prime, it is occasionally possible to form the (n+1)th prime using the same digits in a different order. Such a pair is called an Ormiston pair.
Ormiston pairs occur rarely but randomly. It is thought that there are infinitely many but this has not been proved. They always differ by a multiple of 18. Ormiston triples also exist - see A075093.
"Anagram" means that both primes must not only use the same digits but must use each digit the same number of times. [From Harvey P. Dale, Mar 06 2012]
Dickson's conjecture would imply that the sequence is infinite, e.g. that there are infinitely many k for which 1913+3972900*k and 1931+3972900*k form an Ormiston pair. - Robert Israel, Feb 23 2017

Examples

			1913 and 1931 are two successive primes.
Although 179 and 197 are composed of the same digits, they do not form an Ormiston pair as several other primes intervene (i.e. 181, 191, 193).
		

References

  • Andy Edwards, Ormiston Pairs, Australian Mathematics Teacher, Vol. 58, No. 2 (2002), pp. 12-13.

Crossrefs

Programs

  • Haskell
    import Data.List (sort)
    a069567 n = a069567_list !! (n-1)
    a069567_list = f a000040_list where
       f (p:ps@(p':_)) = if sort (show p) == sort (show p')
                         then p : f ps else f ps
    -- Reinhard Zumkeller, Apr 03 2015
    
  • Maple
    N:= 10^6: # to get all terms <= N
    R:= NULL: p:= 3: q:= 5:
    while p <= N do
      p:= q;
      q:= nextprime(q);
      if q-p mod 18 = 0 and sort(convert(p,base,10)) = sort(convert(q,base,10)) then
        R:= R, p
      fi
    od:
    R; # Robert Israel, Feb 23 2017
  • Mathematica
    Prime[ Select[ Range[10^4], Sort[ IntegerDigits[ Prime[ # ]]] == Sort[ IntegerDigits[ Prime[ # + 1]]] & ]]
    a = {1}; b = {2}; Do[b = Sort[ IntegerDigits[ Prime[n]]]; If[a == b, Print[ Prime[n - 1], ", ", Prime[n]]]; a = b, {n, 1, 10^4}]
    Transpose[Select[Partition[Prime[Range[8600]],2,1],Sort[IntegerDigits[ First[#]]] == Sort[ IntegerDigits[Last[#]]]&]][[1]] (* Harvey P. Dale, Mar 06 2012 *)
  • PARI
    is(n)=isprime(n)&&vecsort(Vec(Str(n)))==vecsort(Vec(Str(nextprime(n+1)))) \\ Charles R Greathouse IV, Aug 09 2011
    
  • PARI
    p=2;forprime(q=3,1e5,if((q-p)%18==0&&vecsort(Vec(Str(p)))==vecsort(Vec(Str(q))),print1(p", "));p=q) \\ Charles R Greathouse IV, Aug 09 2011, minor edits by M. F. Hasler, Oct 11 2012
    
  • Python
    from sympy import nextprime
    from itertools import islice
    def agen(): # generator of terms
        p, hp, q, hq = 2, "2", 3, "3"
        while True:
            if hp == hq: yield p
            p, q = q, nextprime(q)
            hp, hq = hq, "".join(sorted(str(q)))
    print(list(islice(agen(), 38))) # Michael S. Branicky, Feb 19 2024

Extensions

Comments and references from Andy Edwards (AndynGen(AT)aol.com), Jul 09 2002
Edited by Robert G. Wilson v, Jul 15 2002 and Aug 29 2002
Minor edits by Ray Chandler, Jul 16 2009

A028905 Arrange digits of primes in ascending order.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 13, 37, 14, 34, 47, 35, 59, 16, 67, 17, 37, 79, 38, 89, 79, 11, 13, 17, 19, 113, 127, 113, 137, 139, 149, 115, 157, 136, 167, 137, 179, 118, 119, 139, 179, 199, 112, 223, 227, 229, 233, 239, 124, 125, 257, 236, 269
Offset: 1

Views

Author

Keywords

Comments

Leading zeros are discarded (e.g., 107, rearranged to 017, becomes 17).

Examples

			The digits of 41 are 4, 1, which sorted are 1, 4; those are reinterpreted as 14.
The digits of 43 are 4, 3, which sorted are 3, 4; those are reinterpreted as 34.
The digits of 47 are 4, 7, which are already sorted, so 47 is not changed.
		

Crossrefs

Programs

  • Haskell
    a028905 = a004185 . a000040  -- Reinhard Zumkeller, Apr 03 2015
    
  • Mathematica
    Table[FromDigits[Sort[IntegerDigits[Prime[n]]]], {n, 100}] (* Alonso del Arte, Nov 25 2019 *)
  • PARI
    eva(n) = subst(Pol(n), x, 10)
    a(n) = eva(vecsort(digits(prime(n)))) \\ Felix Fröhlich, Nov 25 2019

Formula

a(n) = A004185(A000040(n)). - Reinhard Zumkeller, Apr 03 2015
a(n) = prime(n) if prime(n) is in A028864. - Alonso del Arte, Nov 25 2019

Extensions

More terms from Patrick De Geest, Apr 1998
Offset corrected by Reinhard Zumkeller, Apr 03 2015
Showing 1-5 of 5 results.