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.

A086005 Semiprimes sandwiched between semiprimes.

Original entry on oeis.org

34, 86, 94, 122, 142, 202, 214, 218, 302, 394, 446, 634, 698, 842, 922, 1042, 1138, 1262, 1346, 1402, 1642, 1762, 1838, 1894, 1942, 1982, 2102, 2182, 2218, 2306, 2362, 2434, 2462, 2518, 2642, 2722, 2734, 3098, 3386, 3602, 3694, 3866, 3902, 3958, 4286, 4414
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 07 2003

Keywords

Comments

These are some of the balanced semiprimes (see A213025). - Alonso del Arte, Jun 04 2012

Examples

			94 = 47*2: 94 - 1 = 3*31 and 94 + 1 = 5*19, therefore 94 is in the sequence.
		

Crossrefs

Programs

  • Haskell
    a086005 n = a086005_list !! (n-1)
    a086005_list = filter
       (\x -> a064911 (x - 1) == 1 && a064911 (x + 1) == 1) a100484_list
    -- Reinhard Zumkeller, Aug 08 2013, Jun 10 2012
    
  • Mathematica
    u[n_]:=Plus@@Last/@FactorInteger[n]==2;lst={};Do[If[u[n],sp=n;If[u[sp-1]&&u[sp+1],AppendTo[lst,sp]]],{n,8!}];lst  (* Vladimir Joseph Stephan Orlovsky, Nov 16 2009 *)
    (* First run program for A109611 to define semiPrimeQ *) Select[Range[4000], Union[{semiPrimeQ[# - 1], semiPrimeQ[#], semiPrimeQ[# + 1]}] == {True} &] (* Alonso del Arte, Jun 03 2012 *)
    Select[Partition[Range@ 4000, 3, 1], Union@ PrimeOmega@ # == {2} &][[All, 2]] (* Michael De Vlieger, Jun 14 2017 *)
  • Python
    from itertools import count, islice
    from sympy import factorint, isprime
    def agen(): # generator of terms
        nxt = 0
        for k in count(2, 2):
            prv, nxt = nxt, sum(factorint(k+1).values())
            if prv == nxt == 2 and isprime(k//2): yield k
    print(list(islice(agen(), 46))) # Michael S. Branicky, Nov 26 2022

Formula

a(n) = 2*A086006(n).
a(n) = A056809(n)+1. - Zak Seidov, Sep 30 2012

A258276 Balanced sphenic numbers (of order one): sphenic numbers (A007304) that are the average of the previous sphenic number and the following sphenic number.

Original entry on oeis.org

186, 370, 406, 418, 518, 582, 602, 710, 786, 814, 826, 830, 942, 978, 994, 1010, 1034, 1070, 1162, 1310, 1374, 1394, 1570, 1630, 1686, 1758, 1886, 1978, 2014, 2114, 2158, 2270, 2274, 2278, 2294, 2438, 2510, 2534, 2570, 2630, 2666, 2690, 2774, 2778, 2782, 2806
Offset: 1

Views

Author

Antonio Roldán, May 25 2015

Keywords

Examples

			406 is in this sequence because 406 = A007304(45) = (402+410)/2 = (A007304(44) + A007304(46))/2.
		

Crossrefs

Programs

  • Mathematica
    a=30; b=42; c=66; L={}; While[ Length[L]<100, If[b-a == c-b, AppendTo[L, b]]; a=b; b=c++; While[ Last/@ FactorInteger[c] != {1,1,1}, c++]]; L (* Giovanni Resta, Jun 09 2015 *)
  • PARI
    issphenic(n)=if(n>0,omega(n)==3&&bigomega(n)==3,0)
    nextsph(n)={local(k=n+1);while(!issphenic(k),k+=1);k}
    precsph(n)={local(k=n-1);while(!issphenic(k)&&k>0,k-=1);k}
    {for(i=1,4*10^3,if(issphenic(i)&&2*i== nextsph(i)+ precsph(i),print1(i, ", ")))}

A213063 Balanced numbers (of order one): k-almost primes that are the average of three successive k-almost primes.

Original entry on oeis.org

5, 34, 53, 68, 86, 94, 102, 122, 142, 157, 171, 173, 185, 188, 194, 202, 204, 211, 214, 218, 245, 257, 258, 262, 263, 285, 289, 302, 314, 321, 338, 342, 358, 366, 371, 373, 394, 404, 407, 413, 415, 422, 429, 435, 446, 471, 489, 490, 493, 497, 507, 513, 517, 524, 535, 562
Offset: 1

Views

Author

Gerasimov Sergey, Jun 03 2012

Keywords

Comments

Balanced numbers of order one: defined by the union of balanced primes A006562, balanced semiprimes A213025, balanced 3-almost primes (68, 102, 171, 188, 245, 258, 285, 338, 366, 404, 429, 435, 507, 524,..), balanced 4-almost primes (204, 342, 490, 513,..),.., balanced k-almost primes - all of order one.
Balanced numbers of order two are 79, 119, 148, 205, 218, 281, 299, 302, 339, 349, 410, 439, 493,.., defined by the union of balanced primes of order two of A082077, balanced semiprimes of order two (119, 205, 218, 299, 302, 339, 493,..), balanced 3-almost primes of order two (148, 410, 604, 609, 642..),.., balanced k-almost primes of order two.

Crossrefs

Programs

  • PARI
    list(lim)={
    lim=lim\1+.5;
    my(v=List(),L=log(lim)\log(2),left=vector(L),middle=vector(L),t);
    for(n=3,2*lim,
    t=bigomega(n);
    if(t>L,next);
    if(middle[t],
    if(2*middle[t] == left[t] + n,
    if(middle[t] < lim,
    listput(v,middle[t])
    ,
    if(vecmin(middle) > lim, return(vecsort(Vec(v))))
    )
    );
    left[t]=middle[t];
    middle[t]=n
    ,
    if(left[t],middle[t]=n,left[t]=n)
    )
    )
    }; \\ Charles R Greathouse IV, Jun 14 2012

A365222 a(n) is the least semiprime such that a(n) - n and a(n) + n are the previous and the next semiprimes.

Original entry on oeis.org

34, 185, 262, 407, 314, 371, 194, 2271, 6218, 4237, 109898, 110645, 53602, 169773, 112298, 163985, 284738, 48529, 1033378, 1781833, 570502, 1963091, 12527458, 6051613, 30377422, 19549343, 66761746, 7926901, 363311378, 5861227, 676386278, 136503631, 72622874, 51204973, 375025874
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Aug 26 2023

Keywords

Examples

			a(3) = 262 because 262 = 2 * 131 is a semiprime, the previous semiprime is 262 - 3 = 259 = 7 * 37, the next semiprime is 262 + 3 = 265 = 5 * 53, and no semiprime less than 262 works.
		

Crossrefs

Programs

  • Maple
    N:= 46: # for a(1) .. a(N)
    V:= Vector(N):
    b:= 6: d:= 2: count:= 0:
    for i from 7 while count < N do
      if numtheory:-bigomega(i) = 2 then
        ib:= i-b;
        if ib = d and ib <= N then
          if V[d] = 0 then V[d]:= b; count:= count+1 fi
        else d:= ib
        fi;
        b:= i;
      fi;
    od:
    convert(V,list);
Showing 1-4 of 4 results.