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 1773 results. Next

A115654 Semiprimes (A001358) which are the sum of distinct double factorials (A006882).

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 25, 26, 49, 51, 57, 58, 62, 65, 69, 74, 77, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 155, 158, 159, 161, 166, 169, 177, 178, 386, 393, 394, 395, 398, 403, 407, 411, 413, 437, 445, 446, 447, 451, 453, 458, 489, 493, 497
Offset: 1

Views

Author

Giovanni Resta, Jan 28 2006

Keywords

Comments

Double factorials 0!! and 1!! are not considered distinct. Note that double factorial (n!!) is different from (n!)!.

Examples

			384 = 2*19 = 8!!+2!!.
		

Crossrefs

Programs

  • Mathematica
    Union[Select[Total/@Subsets[Range[10]!!,10],PrimeOmega[#]==2&]] (* Harvey P. Dale, Aug 24 2012 *)

A115670 Semiprimes (A001358) whose digit reversal is prime.

Original entry on oeis.org

14, 34, 35, 38, 74, 91, 95, 106, 118, 119, 133, 134, 142, 145, 146, 166, 194, 301, 305, 334, 346, 358, 361, 362, 365, 371, 377, 382, 386, 391, 395, 703, 706, 713, 721, 731, 745, 746, 749, 755, 758, 763, 778, 779, 785, 791, 793, 799, 901, 905, 914, 917, 922
Offset: 1

Views

Author

Giovanni Resta, Jan 31 2006

Keywords

Examples

			35=5*7 is semiprime and 53 is prime.
		

Crossrefs

A124319 Semiprime(3almostprime(n))-3almostprime(semiprime(n)). Commutator[A001358, A014612] at n.

Original entry on oeis.org

2, 6, 7, 12, 16, 17, -11, 24, 23, 20, -1, 10, 48, 40, 39, 26, 14, 4, -1, 51, 60, 48, 48, 43, 31, 39, 22, 15, 37, 32, 39, 60, 90, 82, 68, 63, 64, 58, 66, 51, 53, 48, 28, 34, 42, 24, 28, 39, 87, 96, 106, 124, 124, 135, 131, 131, 88, 91, 72, 96, 103, 83, 83, 81, 91
Offset: 1

Views

Author

Jonathan Vos Post, Oct 26 2006

Keywords

Examples

			a(1) = semiprime(3almostprime(1)) - 3almostprime(semiprime(1)) = 22 - 20 = 2.
a(2) = semiprime(3almostprime(2)) - 3almostprime(semiprime(2)) = 34 - 28 = 6.
a(3) = semiprime(3almostprime(3)) - 3almostprime(semiprime(3)) = 51 - 44 = 7.
a(4) = semiprime(3almostprime(4)) - 3almostprime(semiprime(4)) = 57 - 45 = 12.
a(7) = semiprime(3almostprime(7)) - 3almostprime(semiprime(7)) = 87 - 98 = -11, which is the first negative value in the commutators we have seen in these related set of sequences, exposing an incorrect assumption.
		

Crossrefs

Cf. A124317 Semiprimes indexed by 3-almost primes. A124318 3-almost primes indexed by semiprimes. A124319 semiprime(3almostprime(n)) - 3almostprime(semiprime(n)). A124308 Primes indexed by 5-almost primes. A124309 5-almost primes indexed by primes. A124310 prime(5almostprime(n)) - 5almostprime(prime(n)). 4-almost primes indexed by primes = A124283. prime(4almostprime(n)) - 4almostprime(prime(n)) = A124284. Primes indexed by 3-almost primes = A124268. 3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040, A001358] at n.

Programs

  • Mathematica
    p[k_] := p[k] = Select[Range[1000], PrimeOmega[#] == k &]; p[2][[ Take[p[3], 70]]] - p[3][[Take[p[2], 70]]] (* Giovanni Resta, Jun 13 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A124319(n):
        def f(x): return int(x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        def g(x): return int(x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        def A001358(n):
            m, k = n, g(n)+n
            while m != k:
                m, k = k, g(k)+n
            return m
        m, k = n, f(n)+n
        while m != k:
            m, k = k, f(k)+n
        r, k = (p:=A001358(n)), f(p)+p
        while r != k:
            r, k = k, f(k)+p
        return A001358(m)-r # Chai Wah Wu, Aug 17 2024

Extensions

a(18) corrected and a(22)-a(65) from Giovanni Resta, Jun 13 2016

A172348 Index k of the semiprime A001358(k) = prime(n) * prime(n+1).

Original entry on oeis.org

2, 6, 13, 26, 48, 75, 103, 135, 199, 270, 338, 443, 508, 581, 706, 878, 1001, 1124, 1305, 1413, 1565, 1764, 1978, 2299, 2571, 2724, 2886, 3052, 3213, 3710, 4259, 4581, 4859, 5259, 5668, 5954, 6409, 6797, 7184, 7696, 8029, 8515, 9062, 9325, 9608, 10246, 11444
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Feb 01 2010

Keywords

Comments

The positions of products of 2 successive primes in A001358. - Juri-Stepan Gerasimov, Apr 14 2010

Examples

			n=1: 6 = 2 * 3 = prime(1) * prime(2) = semiprime(2). Therefore a(1) = 2.
n=2: 15 = 3 * 5 = prime(2) * prime(3) = semiprime(6). Therefore a(2) = 6.
n=3: 35 = 5 * 7 = prime(3) * prime(4) = semiprime(13). Therefore a(3) = 13.
		

References

  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Band I, B. G. Teubner, Leipzig u. Berlin, 1909.
  • Derrick H. Lehmer, Guide to Tables in the Theory of Numbers Washington, D.C. 1941.

Crossrefs

Programs

  • Maple
    A001358 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if numtheory[bigomega](a)= 2 then return a; end if; end do ; end if; end proc:
    A006094 := proc(n) ithprime(n)*ithprime(n+1) ; end proc:
    A172348 := proc(n) pp := A006094(n) ; for k from 1 do if A001358(k) = pp then return k; end if; end do ; end proc:
    seq(A172348(n),n=1..70) ; # R. J. Mathar, Feb 09 2010
  • Mathematica
    semiPrimePi[n_] := Sum[ PrimePi[n/Prime@ i] - i + 1, {i, PrimePi@ Sqrt@ n}];  semiPrimePi@# & /@ Table[ Prime[n] Prime[n + 1], {n, 47}] (* Robert G. Wilson v, Feb 02 2013 *)
    nn=50000;Flatten[Module[{sp=Select[Range[nn+PrimePi[nn]],PrimeOmega[#] == 2&]},Table[ Position[sp,Prime[n]Prime[n+1]],{n,PrimePi[nn]}]]] (* Harvey P. Dale, Sep 07 2013 *)

Formula

a(n) = {k: A001358(k) = A006094(n)}.

Extensions

Entries checked by R. J. Mathar, Feb 09 2010

A181522 Number of subsets of {1,2,...,n} whose sum is semiprime (cf. A001358, A064911).

Original entry on oeis.org

0, 0, 2, 6, 13, 25, 47, 92, 184, 367, 721, 1416, 2769, 5407, 10662, 21135, 41866, 83220, 166617, 334852, 670725, 1334868, 2650263, 5280475, 10567613, 21145411, 42103939, 83382359, 164843079, 326791838, 650995628, 1301718424, 2605360702, 5205671338, 10369588530
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 27 2010

Keywords

Examples

			a(4) = #{{1,3}, {4}, {1,2,3}, {2,4}, {2,3,4}, {1,2,3,4}} = 6.
		

Crossrefs

Programs

  • Haskell
    import Data.List (subsequences)
    a181522 = length . filter ((== 1) . a064911 . sum) .
                              subsequences . enumFromTo 1
    -- Reinhard Zumkeller, Feb 22 2012, Oct 27 2010

A184728 a(n) = largest k such that A001358(n+1) = A001358(n) + (A001358(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 8, 6, 13, 9, 20, 19, 24, 19, 32, 33, 32, 37, 32, 43, 47, 47, 53, 56, 54, 59, 61, 64, 71, 72, 79, 84, 85, 83, 89, 92, 93, 84, 101, 107, 112, 117, 117, 120, 121, 117, 125, 132, 127, 140, 141, 141, 144, 137, 152, 157, 157
Offset: 1

Views

Author

Rémi Eismann, Jan 20 2011

Keywords

Comments

a(n) = A001358(n) - A065516(n) if A001358(n) - A065516(n) > A065516(n), 0 otherwise.
A001358(n): semiprimes; A065516(n): first difference of semiprimes.

Examples

			For n = 1 we have A001358(n) = 4, A001358(n+1) = 6; there is no k such that 6 - 4 = 2 = (4 mod k), hence a(1) = 0.
For n = 3 we have A001358(n) = 9, A001358(n+1) = 10; 8 is the largest k such that 10 - 9 = 1 = (9 mod k), hence a(3) = 8; a(3) = A001358(3) - A065516(3) = 8.
For n = 20 we have A001358(n) = 57, A001358(n+1) = 58; 56 is the largest k such that 58 - 57 = 1 = (57 mod k), hence a(20) = 56; a(20) = A001358(20) - A065516(20) = 56.
		

Crossrefs

A259676 Heptagonal numbers (A000566) that are semiprimes (A001358).

Original entry on oeis.org

34, 55, 235, 403, 469, 697, 1177, 1651, 2059, 2839, 4141, 5221, 6943, 9211, 9517, 13213, 13579, 21949, 23377, 25351, 29539, 31753, 34633, 37027, 53071, 62173, 68641, 74563, 78943, 93799, 96727, 118483, 130759, 144841, 164737, 171217, 187279, 191407, 196981
Offset: 1

Views

Author

Colin Barker, Jul 03 2015

Keywords

Comments

For these semiprimes k*(5*k-3)/2, the corresponding k are listed in A114517.

Examples

			The heptagonal number 34 is in the sequence because 34 = 2 * 17.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func; [s: n in [2..300] | IsSemiprime(s) where s is n*(5*n-3) div 2]; // Vincenzo Librandi, Jul 04 2015
  • Mathematica
    a={}; Do[If[PrimeOmega[n (5 n - 3) / 2]==2, AppendTo[a, n(5 n - 3) / 2]], {n, 1, 200}]; a (* Vincenzo Librandi, Jul 04 2015 *)
    Select[PolygonalNumber[7,Range[300]],PrimeOmega[#]==2&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 07 2021 *)
  • PARI
    pg(m, n) = (n^2*(m-2)-n*(m-4))/2 \\ n-th m-gonal number
    select(n->bigomega(n)==2, vector(2000, n, pg(7, n)))
    

Formula

Equals A000566 intersect A001358.

A085367 Semiprimes that can be expressed as the sum or difference of two cubes: intersection of A001358 and A045980.

Original entry on oeis.org

9, 26, 35, 65, 91, 133, 169, 215, 217, 218, 335, 341, 386, 407, 469, 485, 511, 559, 721, 737, 793, 817, 866, 973, 1027, 1115, 1141, 1241, 1261, 1267, 1339, 1343, 1385, 1387, 1538, 1603, 1685, 1727, 1843, 1853, 1981, 2071, 2189, 2402, 2413, 2611, 2743, 2771
Offset: 1

Views

Author

Hugo Pfoertner, Jun 25 2003

Keywords

Examples

			a(1)=9 because 2^3+1^3=3*3, a(2)=26=3^3-1^3=2*13.
a(5)=91 is the smallest semiprime expressible in two different ways: 91=4^3+3^3=6^3-5^3=7*13.
		

Crossrefs

Programs

  • PARI
    T=thueinit('z^3+1);
    is(n)=bigomega(n)==2 && #thue(T, n)
    list(lim)=my(v=List()); forprime(p=2,lim\2, forprime(q=2,min(lim\p,p), if(#thue(T, p*q), listput(v,p*q)))); Set(v) \\ Charles R Greathouse IV, Nov 29 2014

A104623 Indices of semiprime (A001358) values of Heptanacci-Lucas numbers A104621.

Original entry on oeis.org

4, 8, 9, 11, 12, 14, 15, 16, 22, 23, 32, 34, 37, 41, 42, 50, 52, 57, 58, 66, 69, 76, 77, 81, 90, 120, 139
Offset: 0

Views

Author

Jonathan Vos Post, Mar 17 2005

Keywords

Comments

The 7th-order linear recurrence A104622 (heptanacci-Lucas numbers) is a generalization of the Lucas sequence A000032. T. D. Noe and I have noted that the heptanacci-Lucas numbers have many more primes than the corresponding heptanacci (see A104414) which he found has only the first 3 primes that I identified through the first 5000 values, whereas these heptanacci-Lucas numbers have 17 primes among the first 100 values. For primes in Heptanacci-Lucas numbers, see A104622.

Examples

			A104621(4) = 15 = 3 * 5,
A104621(8) = 247 = 13 * 19,
A104621(9) = 493 = 17 * 29,
A104621(11) = 1959 = 3 * 653,
A104621(12) = 3903 = 3 * 1301,
A104621(14) = 15487 = 17 * 911,
		

Crossrefs

Cf. A001358.

A115646 Semiprimes (A001358) that are sums of distinct factorials.

Original entry on oeis.org

6, 9, 25, 26, 33, 121, 122, 123, 129, 145, 146, 721, 723, 745, 746, 753, 841, 842, 843, 849, 865, 866, 871, 5041, 5042, 5065, 5071, 5161, 5163, 5169, 5186, 5191, 5761, 5767, 5793, 5905, 5906, 5911, 40321, 40322, 40323, 40345, 40346, 40353, 40441
Offset: 1

Views

Author

Giovanni Resta, Jan 27 2006

Keywords

Comments

Factorials 0! and 1! are not considered distinct.

Examples

			721 = 6!+1! = 7*103.
		

Crossrefs

Programs

  • Mathematica
    semipQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; fac=Range[10]!;lst={}; Do[ n = Plus@@(fac*IntegerDigits[k, 2, 10]); If[semipQ[n], AppendTo[lst, n]], {k, 2^10-1}]; Union[lst]
Previous Showing 31-40 of 1773 results. Next