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 11-20 of 23 results. Next

A110208 1 + sum of first n semiprimes.

Original entry on oeis.org

1, 5, 11, 20, 30, 44, 59, 80, 102, 127, 153, 186, 220, 255, 293, 332, 378, 427, 478, 533, 590, 648, 710, 775, 844, 918, 995, 1077, 1162, 1248, 1335, 1426, 1519, 1613, 1708, 1814, 1925, 2040, 2158, 2277, 2398, 2520, 2643, 2772, 2905, 3039, 3180, 3322, 3465
Offset: 0

Views

Author

Jonathan Vos Post, Sep 06 2005

Keywords

Comments

First differences are the sequence of semiprimes (A001358). Hence a(n) is the least positive sequence whose first differences are the sequence of semiprimes. Primes in this sequence include: a(1) = 5, a(2) = 11, a(6) = 59, a(9) = 127, a(14) = 293, a(33) = 1613. Semiprimes in this sequence include: a(17) = 427 = 7 * 61, a(18) = 478 = 2 * 239, a(19) = 533 = 13 * 41, a(26) = 995 = 5 * 199, a(27) = 1077 = 3 * 359, a(35) = 1814 = 2 * 907, a(42) = 2643 = 3 * 881, a(45) = 3039 = 3 * 1013.

Crossrefs

Programs

  • Mathematica
    Accumulate[Join[{1},Select[Range[200],PrimeOmega[#]==2&]]] (* Harvey P. Dale, Apr 29 2018 *)

Formula

a(0) = 1; for n>0, a(n) = 1 + A062198(n).

A180152 Numbers k such that the sum of the first k semiprimes is a prime.

Original entry on oeis.org

3, 4, 5, 7, 8, 15, 21, 22, 37, 56, 59, 62, 82, 85, 89, 91, 114, 119, 121, 129, 139, 146, 168, 169, 189, 195, 197, 214, 227, 258, 286, 295, 312, 333, 341, 352, 360, 361, 387, 400, 419, 426, 434, 437, 440, 466, 470, 483, 495, 497, 504, 556, 595, 610, 619, 629, 636
Offset: 1

Views

Author

Jason G. Wurtzel, Aug 13 2010

Keywords

Examples

			21 is a term because the sum of the first 21 semiprimes is 647, which is prime.
		

Crossrefs

Programs

  • Magma
    SP:=[ n: n in [2..3000] | &+[ k[2]: k in Factorization(n) ] eq 2 ]; V:=[]; s:=0; for j in [1..640] do s+:=SP[j]; if IsPrime(s) then Append(~V, j); end if; end for; V; // Klaus Brockhaus, Aug 14 2010
  • Maple
    A062198 := proc(n) add( A001358(i),i=1..n) ; end proc:
    isA180152 := proc(n) isprime( A062198(n)) ; end proc:
    for n from 1 to 1000 do if isA180152(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Aug 14 2010
  • Mathematica
    Position[Accumulate[Select[Range[10000],PrimeOmega[#]==2&]],?PrimeQ] // Flatten (* _Harvey P. Dale, Feb 17 2021 *)

Extensions

More terms from Klaus Brockhaus and R. J. Mathar, Aug 14 2010

A347413 a(n) = (product of first n semiprimes) mod (sum of first n semiprimes).

Original entry on oeis.org

0, 4, 7, 14, 11, 40, 17, 17, 0, 8, 85, 147, 62, 16, 292, 26, 138, 18, 0, 570, 167, 257, 360, 156, 525, 882, 372, 918, 0, 0, 0, 0, 0, 150, 0, 0, 1070, 2136, 1172, 0, 1265, 1502, 663, 0, 0, 0, 0, 1208, 306, 2995, 0, 1404, 1389, 636, 0, 272, 0, 1944, 5216, 2268, 1548, 1160, 3300, 0, 924, 84, 0, 3723
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 31 2021

Keywords

Comments

A surprising number of terms are 0: 3124 of the first 10000 terms.

Examples

			The first 3 semiprimes are 4, 6, 9, so a(3) = (4*6*9) mod (4+6+9) = 216 mod 19 = 7.
		

Crossrefs

Programs

  • Maple
    R:= NULL:
    s:= 0: p:= 1: count:= 0:
    for n from 4 while count < 100 do
      if numtheory:-bigomega(n) = 2 then
        count:= count+1: s:= s+n; p:= p*n;
        R:= R, p mod s;
      fi
    od:
    R;
  • Python
    from sympy import factorint
    def aupton(terms):
        alst, i, n, s, p = [], 1, 0, 0, 1
        while n < terms:
            if sum(factorint(i).values()) == 2:
                n += 1; s += i; p *= i
                alst.append(p%s)
            i += 1
        return alst
    print(aupton(68)) # Michael S. Branicky, Sep 01 2021

Formula

a(n) = A112141(n) mod A062198(n).

A347421 Numbers k such that the product of the first k semiprimes is divisible by the sum of the first k semiprimes.

Original entry on oeis.org

1, 9, 19, 29, 30, 31, 32, 33, 35, 36, 40, 44, 45, 46, 47, 51, 55, 57, 64, 67, 70, 71, 72, 74, 81, 83, 84, 92, 94, 95, 96, 97, 103, 104, 105, 107, 108, 109, 113, 116, 118, 124, 125, 127, 130, 131, 132, 133, 136, 138, 140, 142, 144, 158, 159, 160, 167, 177, 182, 184, 188, 191, 196, 202, 203, 206
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 31 2021

Keywords

Comments

What are the asymptotics of a(n)/n as n -> infinity?

Examples

			a(2) = 9 is a term because the first 9 semiprimes are 4, 6, 9, 10, 14, 15, 21, 22, 25, and 4*6*9*10*14*15*21*22*25 = 5239080000 is divisible by 4+6+9+10+14+15+21+22+25 = 126.
		

Crossrefs

Programs

  • Julia
    using Nemo
    function A347421List(upto)
        c, s, p = 0, ZZ(0), ZZ(1)
        list = Int32[]
        for n in 4:typemax(Int32)
            if 2 == sum([e for (p, e) in factor(n)])
                s += n; p *= n; c += 1
                if divisible(p, s)
                    c > upto && return list
                    push!(list, c)
                end
            end
        end
    end
    A347421List(206) |> println # Peter Luschny, Aug 31 2021
  • Maple
    R:= NULL:
    s:= 0: p:= 1: zcount:= 0: scount:= 0:
    for n from 4 while zcount < 100 do
      if numtheory:-bigomega(n) = 2 then
        s:= s+n; p:= p*n;
        scount:= scount+1;
        if p mod s = 0 then zcount:= zcount+1; R:= R, scount fi
      fi
    od:
    R;
  • Mathematica
    sp = Select[Range[700], PrimeOmega[#] == 2 &]; Position[Divisible[Rest @ FoldList[Times, 1, sp], Accumulate @ sp], True] // Flatten (* Amiram Eldar, Aug 31 2021 *)
  • Python
    from sympy import factorint
    def aupto(limit):
        alst, i, k, s, p = [], 1, 0, 0, 1
        while k < limit:
            if sum(factorint(i).values()) == 2:
                k += 1; s += i; p *= i
                if p%s == 0: alst.append(k)
            i += 1
        return alst
    print(aupto(206)) # Michael S. Branicky, Aug 31 2021
    

A140234 Sum of the semiprimes <= n.

Original entry on oeis.org

0, 0, 0, 0, 4, 4, 10, 10, 10, 19, 29, 29, 29, 29, 43, 58, 58, 58, 58, 58, 58, 79, 101, 101, 101, 126, 152, 152, 152, 152, 152, 152, 152, 185, 219, 254, 254, 254, 292, 331, 331, 331, 331, 331, 331, 331, 377, 377, 377, 426, 426, 477, 477, 477, 477, 532, 532, 589
Offset: 0

Views

Author

Jonathan Vos Post, May 13 2008

Keywords

Comments

This is to semiprimes A001358 as A034387 is to primes A000040. From the prime number theorem A034387(n) has the asymptotic expression: a(n) ~ n^2 / (2 log n), so what is the asymptotic expression for a(n)?

Crossrefs

Programs

  • Mathematica
    a[n_]:=Total[Select[Range[n],PrimeOmega[#]==2&]];Array[a,58,0] (* James C. McMahon, Jul 06 2025 *)

Formula

a(n) = Sum_{j such that j is in A001358 and j<=n} = A062198(A072000(n)).

A140235 Partial sum of non-semiprimes A100959.

Original entry on oeis.org

1, 3, 6, 11, 18, 26, 37, 49, 62, 78, 95, 113, 132, 152, 175, 199, 226, 254, 283, 313, 344, 376, 412, 449, 489, 530, 572, 615, 659, 704, 751, 799, 849, 901, 954, 1008, 1064, 1123, 1183, 1244, 1307, 1371, 1437, 1504, 1572, 1642, 1713, 1785, 1858, 1933, 2009
Offset: 1

Views

Author

Jonathan Vos Post, May 13 2008

Keywords

Comments

This is to semiprimes A001358 as A051352 is to primes A000040. Equivalently, this is to non-semiprimes A100959 as A051349 is to nonprimes A018252.

Examples

			a(5) = 18 = 1 + 2 + 3 + 5 + 7.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Select[Range[100],PrimeOmega[#]!=2&]] (* Harvey P. Dale, Aug 22 2021 *)

Formula

a(n) = Sum{k=1..n} A100959(k).

Extensions

Corrected and edited by Giovanni Resta, Jun 20 2016

A182081 Next semiprime after the partial sum of the first n semiprimes.

Original entry on oeis.org

6, 14, 21, 33, 46, 62, 82, 106, 129, 155, 187, 221, 259, 295, 334, 381, 427, 478, 533, 591, 649, 713, 778, 849, 921, 995, 1077, 1165, 1253, 1337, 1437, 1522, 1618, 1711, 1814, 1927, 2041, 2159, 2279, 2402, 2533, 2643, 2773, 2906, 3039, 3183, 3326, 3466, 3611
Offset: 1

Views

Author

Jonathan Vos Post, Apr 10 2012

Keywords

Comments

This is to A202301 next prime after the partial sum of the first n primes as A001358 semiprimes is to A000040 primes.

Examples

			a(10) = 155 because 4 + 6 + 9 + 10 + 14 + 15 + 21 + 22 + 25 + 26 = 152, and the next semiprime after 152 is 155.
		

Crossrefs

Programs

  • Maple
    h:= proc(m) local k;
          for k from m+1 while isprime(k) or
            add (i[2], i=ifactors(k)[2])<>2 do od; k
        end:
    b:= proc(n)
          b(n):= h(b(n-1))
        end: b(0):=0:
    s:= proc(n)
          s(n):= b(n) +s(n-1)
        end: s(0):=0:
    a:= n-> h(s(n)):
    seq (a(n), n=1..60); # Alois P. Heinz, Apr 10 2012

Formula

a(n) = min { k > A062198(n) and k in A001358 }.

Extensions

More terms from Alois P. Heinz, Apr 10 2012

A217736 Sum of first n squares of semiprimes.

Original entry on oeis.org

16, 52, 133, 233, 429, 654, 1095, 1579, 2204, 2880, 3969, 5125, 6350, 7794, 9315, 11431, 13832, 16433, 19458, 22707, 26071, 29915, 34140, 38901, 44377, 50306, 57030, 64255, 71651, 79220, 87501, 96150, 104986, 114011, 125247, 137568, 150793, 164717, 178878
Offset: 1

Views

Author

Keywords

Comments

There are 68 such numbers less than one million; a(68) = 988849.

Examples

			a(3) = 4^2 + 6^2 + 9^2 = 133.
		

Crossrefs

Cf. A062198. Equals sum(A001358^2), and sum(A074985).

Programs

  • Mathematica
    Accumulate[Select[Range[200],PrimeOmega[#]==2&]^2] (* Harvey P. Dale, Mar 13 2018 *)

A347366 Primes that are partial sums of the semiprimes.

Original entry on oeis.org

19, 29, 43, 79, 101, 331, 647, 709, 2039, 4723, 5261, 5827, 10271, 11057, 12163, 12743, 20183, 22039, 22807, 25999, 30319, 33563, 44777, 45319, 56843, 60623, 61927, 73583, 83077, 108013, 133447, 142183, 159541, 182659, 191833, 204803, 214463, 215689, 248789, 266239, 292573, 302593, 314339, 318823
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 29 2021

Keywords

Examples

			a(3) = 43 is a term because 43 = A062198(5) is prime.
		

Crossrefs

Primes in A062198. Cf. A001358.

Programs

  • Maple
    SP:= select(t -> numtheory:-bigomega(t) = 2, [$2..10000]):
    PSSP:= ListTools:-PartialSums(SP):
    select(isprime,PSSP);
  • Mathematica
    Select[Accumulate @ Select[Range[1500], PrimeOmega[#] == 2 &], PrimeQ] (* Amiram Eldar, Aug 29 2021 *)
  • Python
    from sympy import factorint, isprime
    def aupto(limit):
        alst, k, s = [], 1, 0
        for k in range(1, limit+1):
            if sum(factorint(k).values()) == 2:
                s += k
                if s > limit: break
                if isprime(s): alst.append(s)
        return alst
    print(aupto(320000)) # Michael S. Branicky, Aug 29 2021

A382831 a(n) is the n-th n-almost-prime that is a partial sum of the sequence of n-almost-primes.

Original entry on oeis.org

2, 10, 964, 1804, 7820, 48120, 830817, 4895208, 11308160, 162802560, 394129476, 3763612800, 19823090472, 1018716103620, 9744542956800, 3989325082624, 329306801920000, 2978224618328064, 11804664377696256, 128906665137012736
Offset: 1

Views

Author

Robert Israel, Apr 28 2025

Keywords

Examples

			The first three members of A086062 that are 3-almost-primes are 8 = 2^3, 20 = 2^2 * 5 = 8 + 12, and 964 = 2^2 * 241 = 8 + 12 + 18 + ... + 92, so a(3) = 964.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) uses priqueue;
      local pq,t,s,x,p,i,count;
      initialize(pq);
      insert([-2^n,2$n],pq);
      s:= 0; count:= 0:
      do
        t:= extract(pq);
        x:= -t[1];
        s:= s + x;
        if numtheory:-bigomega(s) = n  then count:= count+1; if count = n then return s fi fi;
        p:= nextprime(t[-1]);
        for i from n+1 to 2 by -1 while t[i] = t[-1] do
              insert([t[1]*(p/t[-1])^(n+2-i), op(t[2..i-1]), p$(n+2-i)], pq)
        od;
      od
    end proc:
    map(f, [$1..20]);
Previous Showing 11-20 of 23 results. Next