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.

A326952 a(n) = A001222(A028905(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 4, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 2, 1, 1, 1, 5, 1, 1, 1, 1, 1, 3, 3, 1, 3, 1, 1, 1, 7, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 3, 2, 2, 1, 4, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 3, 2, 2
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 sorted digits of a prime number.
Conjecture: the sum of the first n terms of A326952 (smallest to largest sorting) is <= the sum of the first n terms of A326953 (largest to smallest sorting). This is true for the first 9592 terms.

Examples

			The 13th prime number is 41. Sorting the digits gives 14. 14 has 2 factors, 2 and 7. The 13th term of this sequence is 2.
		

Crossrefs

Cf. A001222 (bigomega), A028905, A326953 (for reverse sorting).

Programs

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

A028864 Primes with digits in nondecreasing order.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 47, 59, 67, 79, 89, 113, 127, 137, 139, 149, 157, 167, 179, 199, 223, 227, 229, 233, 239, 257, 269, 277, 337, 347, 349, 359, 367, 379, 389, 449, 457, 467, 479, 499, 557, 569, 577, 599, 677, 1117, 1123, 1129
Offset: 1

Views

Author

Keywords

Comments

Identical digits are acceptable, e.g., 1117 is in the sequence. - Harvey P. Dale, Aug 16 2011

Crossrefs

Programs

  • Magma
    [p:p in PrimesUpTo(1200)| Reverse(Intseq(p)) eq Sort(Intseq(p))]; // Marius A. Burtea, Nov 29 2019
    
  • Mathematica
    daoQ[n_] := Count[Differences[IntegerDigits[n]], ?(# < 0 &)] == 0; Select[Prime[Range[200]], daoQ] (* _Harvey P. Dale, Aug 16 2011 *)
    Select[Prime[Range[200]],Min[Differences[IntegerDigits[#]]]>-1&] (* Harvey P. Dale, Mar 02 2023 *)
  • PARI
    select(n->n=digits(n); n==vecsort(n), primes(500)) \\ Charles R Greathouse IV, Mar 15 2014
    
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy import isprime
    def A028864_gen(): # generator of terms
        yield from (2,3,5,7)
        a, b = {'1':0,'2':1,'3':1,'4':2,'5':2,'6':2,'7':2,'8':3,'9':3}, (1,3,7,9)
        for l in count(1):
            for d in combinations_with_replacement('123456789',l):
                k = 10*int(''.join(d))
                for e in b[a[d[-1]]:]:
                    if isprime(m:=k+e):
                        yield m
    A028864_list = list(islice(A028864_gen(),30)) # Chai Wah Wu, Dec 25 2023
  • R
    j=2; y=as.bigz(c()); while(j<1000) {
    x=sort(as.numeric(strsplit(as.character(j),spl="")[[1]]),decr=F)
    if(j==paste(x[x>0],collapse="")) y=c(y,j)
    j=nextprime(j)
    } //  Christian N. K. Anderson, Apr 04 2013
    

Formula

Trivially, a(n) >> exp(n^(1/10)). - Charles R Greathouse IV, Mar 15 2014
prime(n) = A028905(n) if prime(n) is in this sequence. - Alonso del Arte, Nov 25 2019

Extensions

Definition corrected by Omar E. Pol, Mar 22 2012

A028906 Arrange digits of primes in descending order.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 71, 91, 32, 92, 31, 73, 41, 43, 74, 53, 95, 61, 76, 71, 73, 97, 83, 98, 97, 110, 310, 710, 910, 311, 721, 311, 731, 931, 941, 511, 751, 631, 761, 731, 971, 811, 911, 931, 971, 991, 211, 322, 722, 922, 332, 932, 421, 521
Offset: 1

Views

Author

Keywords

Comments

a(n) = A004186(A000040(n)). - Reinhard Zumkeller, Apr 03 2015

Crossrefs

Programs

  • Haskell
    a028906 = a004186 . a000040  -- Reinhard Zumkeller, Apr 03 2015
  • Mathematica
    Table[FromDigits[Reverse[Sort[IntegerDigits[Prime[n]]]]],{n,60}] (* Harvey P. Dale, Sep 12 2020 *)

Extensions

More terms from Patrick De Geest, Apr 15 1998
Showing 1-3 of 3 results.