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.

A185008 Next semiprime after 10*n.

Original entry on oeis.org

4, 14, 21, 33, 46, 51, 62, 74, 82, 91, 106, 111, 121, 133, 141, 155, 161, 177, 183, 194, 201, 213, 221, 235, 247, 253, 262, 274, 287, 291, 301, 314, 321, 334, 341, 355, 361, 371, 381, 391, 403, 411, 422, 437, 445, 451, 466, 471, 481, 493, 501, 511, 526, 533
Offset: 0

Views

Author

Jonathan Vos Post, Nov 01 2012

Keywords

Comments

This is to semiprimes A001358 as A218255 is to primes A000040.

Examples

			a(0) = 4 because 4=2^2 is the least semiprime > 10*0=0.
a(1) = 14 because 14=2*7 is the least semiprime > 10*1=10.
		

Crossrefs

Programs

  • Mathematica
    SemiprimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; NextSemiprime[n_] := Module[{m = n + 1}, While[! SemiPrimeQ[m], m++]; m]; Table[NextSemiprime[10*n], {n, 0, 100}] (* T. D. Noe, Nov 02 2012 *)
    nsp[n_]:=Module[{k=n+1},While[PrimeOmega[k]!=2,k++];k]; Table[nsp[10n],{n,0,60}] (* Harvey P. Dale, Mar 17 2023 *)
  • Python
    from sympy import primeomega
    def nextsemiprime(n):
      while primeomega(n + 1) != 2: n += 1
      return n + 1
    def a(n): return nextsemiprime(10*n)
    print([a(n) for n in range(54)]) # Michael S. Branicky, Apr 14 2021

Formula

a(n) = MIN[k in A218255 and k > 10*n].

A218643 Array, by antidiagonals, A(n,k) = next number that is the product of exactly k primes (not necessarily distinct) after 10*n.

Original entry on oeis.org

2, 4, 11, 8, 14, 23, 16, 12, 21, 31, 32, 16, 27, 33, 41, 64, 32, 24, 42, 46, 53, 128, 64, 32, 36, 42, 51, 61, 256, 128, 64, 32, 54, 52, 62, 71, 512, 256, 128, 64, 48, 54, 63, 74, 83, 1024, 512, 256, 128, 64, 72, 81, 75, 82, 97, 2048, 1024, 512, 256, 128, 64, 72, 81, 92, 91, 101, 4096, 2048, 1024, 512, 256, 128, 64, 72, 81, 92, 106, 113, 8192, 4096, 2048, 1024, 512, 256, 128, 96, 108, 100, 102, 111, 127
Offset: 1

Views

Author

Jonathan Vos Post, Nov 03 2012

Keywords

Examples

			Table begins:
========================================================
...|n=0|n=1|n=2|n=3|n=4|n=5|n=6|n=7|n=7|n=9|n=10|
k=1|.2.|.11|.23|.31|.41|.53|.61|.71|.83|.97|.101|A218255
k=2|.4.|.14|.21|.33|.46|.51|.62|.74|.82|.91|.106|A185008
k=3|.8.|.12|.27|.42|.42|.52|.63|.75|.92|.92|.102|
k=4|16.|.16|.24|.36|.54|.54|.81|.81|.81|100|.104|
k=5|32.|.32|.32|.32|.48|.72|.72|.72|108|108|.108|
k=6|64.|.64|.64|.64|.64|.64|.64|.96|.96|.96|.144|
========================================================
		

Crossrefs

Programs

  • Maple
    A218643 := proc(n,k)
        local a;
        for a from 10*n+1 do
            if numtheory[bigomega](a) = k then
                return a;
            end if;
        end do:
    end proc:
    for d from 1 to 13 do
        for n from 0 to d-1 do
            printf("%d,",A218643(n,d-n)) ;
        end do:
    end do: # R. J. Mathar, Nov 07 2012

A218558 Next number that is the product of exactly three (not necessarily distinct) primes, after 10*n.

Original entry on oeis.org

8, 12, 27, 42, 42, 52, 63, 75, 92, 92, 102, 114, 124, 138, 147, 153, 164, 171, 182, 195, 207, 212, 222, 231, 242, 255, 261, 273, 282, 292, 310, 316, 322, 332, 343, 354, 363, 374, 385, 399, 402, 412, 423, 434, 442, 452, 465, 474, 483, 494, 506
Offset: 1

Views

Author

Jonathan Vos Post, Nov 02 2012

Keywords

Comments

This is to "triprimes" A014612 as A185008 is to semiprimes A001358, and as A218255 is to primes A000040.
The first equal terms are a(4) = a(5) = 42. The density of numbers n such that a(n) = a(n+1) is 1. Similarly, the density of numbers n such that a(n) = a(n+1) = ... = a(n+k) is 1 for any fixed k. - Charles R Greathouse IV, Aug 30 2017

Examples

			a(0) = 8, the first number that is the product of exactly three (not necessarily distinct) primes.
a(1) = 12 = 2^2 * 3, which is >10*1=10.
a(3) = 42 even though 30 = 2*3*5 is a "triprime" because we use ">" rather that ">=" in the definition.
		

Crossrefs

Programs

Formula

a(n) = MIN[k in A014612 and k > 10*n = A008592(n)].

Extensions

Offset corrected by Charles R Greathouse IV, Aug 30 2017

A346979 Count of the prime decimal descendants of n.

Original entry on oeis.org

83, 63, 23, 22, 23, 11, 29, 23, 3, 4, 54, 1, 9, 14, 6, 7, 3, 4, 7, 40, 0, 4, 19, 15, 8, 7, 10, 14, 5, 6, 2, 7, 0, 16, 9, 11, 12, 13, 4, 1, 34, 1, 8, 14, 5, 1, 13, 5, 5, 16, 6, 0, 9, 0, 24, 4, 6, 19, 2, 9, 25, 16, 0, 7, 4, 4, 3, 11, 2, 7, 7, 4, 1, 15, 2, 8, 8
Offset: 0

Views

Author

Ya-Ping Lu, Aug 09 2021

Keywords

Comments

The number of direct decimal descendants (i.e., decimal children) of n is A038800(n). The number of prime decimal descendants of the n-th prime is A214342(p_n). a(n) is the number of prime decimal descendants of n, which include the prime decimal children of n, the prime decimal children of the prime decimal children of n, and so on.
a(0) = Sum_{m=1..4} (A214342(m) + 1); a(1) = Sum_{m=5..8} (A214342(m) + 1).
a(A032352(m)) = 0; a(A119289(m)) = 0.
A214342 is a subset, as A214342(m) = a(prime(m)).
Conjecture 1: a(n) <= 83. Conjecture 2: lim_{n->oo} (n0/n) = 1, where n0 is the number of zero terms, a(k) = 0, for k <= n.

Examples

			a(4) = 23. The 23 prime decimal descendants of 4 are shown in the tree below.
       _____ 4__________________________
      /      |                          \
     41   ___43______________            47
    /    /   |               \             \
  419  431  433               439          479
            / \              /   \        /   \
        4337  4339         4391  4397   4793  4799
             /  |  \        |     |     /  \
        43391 43397 43399 43913 43973 47933 47939
                            |
                         439133
                            |
                        4391339
		

Crossrefs

Programs

  • Mathematica
    Table[Length@Rest@Flatten[FixedPointList[(b=#;Select[Flatten[(a=#;FromDigits/@(Join[IntegerDigits@a,{#}]&/@If[b=={0},Range@9,{1,3,7,9}]))&/@b],PrimeQ])&,{n}]],{n,0,76}] (* Giorgos Kalogeropoulos, Aug 16 2021 *)
  • Python
    from sympy import isprime
    def p_count(k):
        global ct; d = [2, 3, 5, 7] if k == 0 else [1, 3, 7, 9]
        for i in range(4):
            m = 10*k + d[i]
            if isprime(m): ct += 1; p_count(m)
        return ct
    for n in range(100):
        ct = 0; print(p_count(n))
Showing 1-4 of 4 results.