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-2 of 2 results.

A115103 Primes p such that p-1 and p+1 have the same number of prime factors with multiplicity.

Original entry on oeis.org

5, 19, 29, 43, 67, 89, 151, 173, 197, 233, 271, 283, 307, 317, 349, 461, 491, 569, 571, 593, 653, 701, 739, 751, 787, 857, 859, 907, 919, 1013, 1061, 1097, 1277, 1291, 1303, 1483, 1667, 1747, 1831, 1867, 1889, 1913, 1973, 2003, 2083, 2131, 2311, 2357, 2393
Offset: 1

Views

Author

Cino Hilliard, Mar 02 2006

Keywords

Examples

			19-1 = 2*3*3 has 3 factors. 19+1 = 2*2*5 has 3 factors. So 19 is in the table.
		

Crossrefs

Cf. A067386 (without multiplicity), A323498, A323536, A323537.

Programs

  • Maple
    isA115103 := proc(n)
        if not type(n,prime) then
            return false;
        end if;
        if numtheory[bigomega](n-1) <> numtheory[bigomega](n+1) then
            false;
        else
            true ;
        end if ;
    end proc:
    for n from 2 to 3000 do
        if isA115103(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Feb 13 2019
    # second Maple program:
    q:= p-> isprime(p) and (f-> f(p+1)=f(p-1))(numtheory[bigomega]):
    select(q, [$1..3000])[];  # Alois P. Heinz, May 08 2022
  • Mathematica
    Select[Prime[Range[400]],PrimeOmega[#-1]==PrimeOmega[#+1]&] (* Harvey P. Dale, Apr 26 2014 *)
  • PARI
    g(n) = forprime(x=1,n,p1=bigomega(x-1);p2=bigomega(x+1);if(p1==p2,print1(x",")))

A323498 Primes p such that p - k and p + k have the same number of prime factors (with multiplicity), for k = 1..6.

Original entry on oeis.org

2131991, 2917927, 3776273, 4742407, 6853409, 16850609, 21789233, 24095791, 24810251, 26316233, 27470537, 27667529, 28962127, 29896439, 30949327, 31289527, 36123853, 36443893, 38824913, 40941233, 41660009, 42533551, 44233193, 45868967, 48313567, 49265009, 51135991
Offset: 1

Views

Author

Zak Seidov, Jan 16 2019

Keywords

Comments

At least one of p - k and p + k must be composite for each k in for k = 1..5.
Proof: If k = 3 then p - k and p + k are even. If k isn't three then exactly one of p - k, p and p + k is divisible by 3. QED. - David A. Corneth, Jan 18 2019

Examples

			For p = 2131991 is in the sequence because for k=1, p - 1 = 2*5*7*7*9*229 and p + 1 = 2*2*2*3*3*29611 are both 6-almost primes, for k=2, p - 2 = 3*710663 and p + 2 = 29*73517 are both semiprimes, etc.
		

Crossrefs

Cf. A115103 (k=1), A323536 (k=7), A323537 (k=8).

Programs

  • PARI
    upto(n) = {my(res = List(), q = 5); forprime(p = 7, n, t = 1; for(m = 1, 2, for(i = 0, 2, if(bigomega(p + 2*i + m) != bigomega(p - 2*i - m), t = 0; next(2) ) ) ); if(t == 1, listput(res, p)); q = p; ); res } \\ David A. Corneth, Jan 17 2019
    
  • PARI
    is(n) = if(!isprime(n) || n < 7, return(0)); for(k = 1, 6, if(bigomega(n + k) != bigomega(n - k), return(0))); 1 \\ David A. Corneth, Jan 17 2019
    
  • Perl
    use ntheory ':all'; for (my($p,$k)=(2,6); $p <= 10**7; $p = next_prime($p)) { print "$p\n" if vecall {factor($p-$) == factor($p+$)} 1..$k } # Daniel Suteu, Jan 17 2019

Extensions

a(23)-a(27) from David A. Corneth, Jan 17 2019
Showing 1-2 of 2 results.