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

A248909 Completely multiplicative with a(p) = p if p = 6k+1 and a(p) = 1 otherwise.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 13, 7, 1, 1, 1, 1, 19, 1, 7, 1, 1, 1, 1, 13, 1, 7, 1, 1, 31, 1, 1, 1, 7, 1, 37, 19, 13, 1, 1, 7, 43, 1, 1, 1, 1, 1, 49, 1, 1, 13, 1, 1, 1, 7, 19, 1, 1, 1, 61, 31, 7, 1, 13, 1, 67, 1, 1, 7, 1, 1, 73, 37, 1, 19, 7, 13, 79, 1, 1
Offset: 1

Views

Author

Tom Edgar, Mar 06 2015

Keywords

Comments

To compute a(n) replace primes not of the form 6k+1 in the prime factorization of n by 1.
The first place this sequence differs from A170824 is at n = 49.
For p prime, a(p) = p if p is a term in A002476 and a(p) = 1 if p = 2, p = 3 or p is a term in A007528.
a(n) is the largest term of A004611 that divides n. - Peter Munn, Mar 06 2021

Examples

			a(49) = 49 because 49 = 7^2 and 7 = 6*1 + 1.
a(15) = 1 because 15 = 3*5 and neither of these primes is of the form 6k+1.
a(62) = 31 because 62 = 31*2, 31 = 6*5 + 1, and 2 is not of the form 6k+1.
		

Crossrefs

Sequences used in a definition of this sequence: A002476, A004611, A007528, A020639, A028234, A032742.
Equivalent sequence for distinct prime factors: A170824.
Equivalent sequences for prime factors of other forms: A000265 (2k+1), A343430 (3k-1), A170818 (4k+1), A097706 (4k-1), A343431 (6k-1), A065330 (6k+/-1), A065331 (<= 3).

Programs

  • Maple
    A248909 := proc(n)
        local a,pf;
        a := 1 ;
        for pf in ifactors(n)[2] do
            if modp(op(1,pf),6) = 1 then
                a := a*op(1,pf)^op(2,pf) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 14 2015
  • Mathematica
    f[p_, e_] := If[Mod[p, 6] == 1, p^e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
  • PARI
    a(n) = {my(f = factor(n)); for (i=1, #f~, if ((f[i,1] - 1) % 6, f[i, 1] = 1);); factorback(f);} \\ Michel Marcus, Mar 11 2015
    
  • Python
    from sympy import factorint
    def A248909(n):
        y = 1
        for p,e in factorint(n).items():
            y *= (1 if (p-1) % 6 else p)**e
        return y # Chai Wah Wu, Mar 15 2015
    
  • Sage
    n=100; sixnplus1Primes=[x for x in primes_first_n(100) if (x-1)%6==0]
    [prod([(x^(x in sixnplus1Primes))^y for x,y in factor(n)]) for n in [1..n]]
    
  • Scheme
    (define (A248909 n) (if (= 1 n) n (* (if (= 1 (modulo (A020639 n) 6)) (A020639 n) 1) (A248909 (A032742 n))))) ;; Antti Karttunen, Jul 09 2017

Formula

a(1) = 1; for n > 1, if A020639(n) = 1 (mod 6), a(n) = A020639(n) * a(A032742(n)), otherwise a(n) = a(A028234(n)). - Antti Karttunen, Jul 09 2017
a(n) = a(A065330(n)). - Peter Munn, Mar 06 2021

A023883 Nonprimes whose average of divisors is an integer.

Original entry on oeis.org

1, 6, 14, 15, 20, 21, 22, 27, 30, 33, 35, 38, 39, 42, 44, 45, 46, 49, 51, 54, 55, 56, 57, 60, 62, 65, 66, 68, 69, 70, 77, 78, 85, 86, 87, 91, 92, 93, 94, 95, 96, 99, 102, 105, 110, 111, 114, 115, 116, 118, 119, 123, 125, 126, 129, 132, 133, 134, 135, 138
Offset: 1

Views

Author

Keywords

Comments

From Bernard Schott, Mar 27 2021: (Start)
Some subsequences of these nonprimes arithmetic numbers.
- Squares of primes of the form 6k+1 (A002476).
- Cubes of odd primes (A030078 \ {8}).
- Semiprimes 2*p where prime p is of the form 4k+3 (A002145).
- Semiprimes 3*p where p prime <> 3 (A001748 \ {9}).
- Integers 4*p where prime p is of the form 6k-1 (A007528). (End)

Examples

			Sigma(22) = 36, tau(22) = 4, sigma(22)/tau(2) = 9, 22 is not prime, hence 22 belongs to this sequence.
		

Crossrefs

Intersection of A003601 and A018252.
Equals A003601 \ A000040.
Cf. A000005 (tau), A000203 (sigma).

Programs

  • Mathematica
    Select[{Mean[Divisors[#]], #}& /@ Select[Range[140], !PrimeQ[#]&], IntegerQ[#[[1]]]&][[All, 2]] (* Jean-François Alcover, Oct 31 2017 *)

A138694 Numbers n such that the set {2*n+p^2, p any prime} contains exactly one prime.

Original entry on oeis.org

1, 4, 7, 10, 16, 19, 22, 25, 31, 37, 40, 46, 49, 52, 61, 64, 70, 79, 82, 85, 91, 94, 109, 112, 115, 121, 124, 127, 130, 136, 142, 151, 154, 169, 172, 175, 187, 190, 196, 205, 211, 217, 220, 226, 229, 235, 241, 247, 250, 256, 274, 277, 280, 289, 292, 295, 304, 316
Offset: 1

Views

Author

Artur Jasinski, Mar 27 2008

Keywords

Comments

The sequence forms a subset of A016777, as explained below:
For each prime p<>3 we have p^2 =1 (mod 3), see A024700.
(i) For the k where 2*k=2 (mod 3), that is where k=1 (mod 3), this leads to 2*k+p^2=0 (mod 3), so the 2*k+p^2 are divisible by 3 (not prime) unless p=3.
The subcase where 2*k+3^2 is prime generates this sequence here; the subcase where it is not generates A138685.
(ii) For the k where 2*k=0 (mod 3), that is where k=0 (mod 3), one can select any p^2 =1 (mod 3)
to generate a prime 2*k+p^2 = 1 (mod 3), so these k generate many primes (of the form A002476).
(iii) For the k where 2*k=1 (mod 3), that is where k=2 (mod 3), one can select any p^2 =1 (mod 3)
to generate a prime 2*k+p^2 = 2 (mod 3), so these k generate many primes (of the form A003627).
The unique primes associated with each n are in A007528: n=1 associated with A007528(2)=11=2*1+3^2,
n=4 associated with A007528(3)=17=2*4+3^2 etc.

Examples

			3 is not in the sequence because {6+2^2, 6+3^3, 6+5^2, 6+7^2,..} = {10, 15, 31, 55,..,127,..,367,..}
contains the primes 31, 127, 367,..., generated with p=5,11,19...
4 is in the sequence because {8+2^2, 8+3^3, 8+5^2, 8+7^2,..} = {12, 17, 33, 57,...} contains
only one prime (that is, 17), generated with p=3.
		

Crossrefs

Programs

  • Mathematica
    b = {}; Do[a = {}; Do[If[PrimeQ[2*k + Prime[n]^2], AppendTo[a, k]], {n, 1, 100}]; If[Length[a] < 2, AppendTo[b, a]], {k, 1, 500}]; Union[Flatten[b]]

Formula

{This sequence here} Union {A138685} = {A016777}.

Extensions

Edited by R. J. Mathar, May 15 2009

A167135 Primes congruent to {2, 3, 5, 7, 11} mod 12.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 47, 53, 59, 67, 71, 79, 83, 89, 101, 103, 107, 113, 127, 131, 137, 139, 149, 151, 163, 167, 173, 179, 191, 197, 199, 211, 223, 227, 233, 239, 251, 257, 263, 269, 271, 281, 283, 293, 307, 311, 317, 331, 347, 353, 359
Offset: 1

Views

Author

Klaus Brockhaus, Oct 28 2009

Keywords

Comments

Primes p such that p mod 12 is prime.
Primes of the form 12*n+r where n >= 0 and r is in {2, 3, 5, 7, 11}.
Except for the prime 2, these are the primes that are encountered in the set of numbers {x, f(f(x))} where x is of the form 4k+3 with k>=0, and where f(x) is the 3x+1-problem function, and f(f(x)) the second iteration value. Indeed this sequence is the set union of 2 and A002145 (4k+3 primes) and A007528 (6k+5 primes), since f(f(4k+3))=6k+5. Equivalently one does not get any prime from A068228 (the complement of the present sequence). - Michel Marcus and Bill McEachen, May 07 2016

Crossrefs

Subsequences: A002145, A007528. Complement: A068228.
Cf. A003627, A045326, A003631, A045309, A045314, A042987, A078403, A042993, A167134, A167135, A167119: primes p such that p mod k is prime, for k = 3..13 resp.

Programs

  • Magma
    [ p: p in PrimesUpTo(760) | p mod 12 in {2, 3, 5, 7, 11} ];
    
  • Magma
    [ p: p in PrimesUpTo(760) | exists(t){ n: n in [0..p div 12] | exists(u){ r: r in {2, 3, 5,7, 11} | p eq (12*n+r) } } ];
  • Maple
    isA167135  := n -> isprime(n) and not modp(n, 12) != 1:
    select(isA167135, [$1..360]); # Peter Luschny, Mar 28 2018
  • Mathematica
    Select[Prime[Range[400]],MemberQ[{2,3, 5, 7, 11},Mod[#,12]]&] (* Vincenzo Librandi, Aug 05 2012 *)
    Select[Prime[Range[72]], Mod[#, 12] != 1 &] (* Peter Luschny, Mar 28 2018 *)

A334544 Primes of the form 6k - 1 preceding the first-occurrence gaps in A334543.

Original entry on oeis.org

5, 29, 113, 197, 359, 521, 1109, 1733, 4289, 6389, 7349, 8297, 9059, 12821, 35603, 37691, 58787, 59771, 97673, 105767, 130649, 148517, 153749, 180797, 220019, 328127, 402593, 406907, 416693, 542261, 780401, 1138127, 1294367, 1444271, 1463621, 1604753
Offset: 1

Views

Author

Alexei Kourbatov, May 05 2020

Keywords

Comments

Subsequence of A007528. Contains A268929 as a subsequence. First differs from A268929 at a(5)=359.
A334543 lists the corresponding gap sizes; see more comments there.

Examples

			The first two primes of the form 6k-1 are 5 and 11; we have a(1)=5. The next primes of this form are 17, 23, 29; the gaps 17-11 = 23-17 = 29-23 have size 6 which already occurred before; so nothing is added to the sequence. The next prime of this form is 41 and the gap size 41-29=12 has not occurred before, so a(2)=29.
		

Crossrefs

Programs

  • PARI
    isFirstOcc=vector(9999,j,1); s=5; forprime(p=11,1e8,if(p%6!=5,next); g=p-s; if(isFirstOcc[g/6], print1(s", "); isFirstOcc[g/6]=0); s=p)

Formula

a(n) = A334545(n) - A334543(n).

A063909 Primes p such that 2*p - 5 is also prime.

Original entry on oeis.org

5, 11, 17, 23, 29, 47, 53, 59, 71, 89, 101, 131, 137, 149, 179, 197, 227, 233, 257, 263, 281, 311, 353, 383, 389, 401, 431, 443, 467, 479, 491, 509, 557, 593, 599, 617, 641, 647, 653, 683, 719, 743, 809, 821, 857, 863, 941, 947, 953, 977, 1109
Offset: 1

Views

Author

N. J. A. Sloane, Aug 31 2001

Keywords

Comments

All terms are == 5 (mod 6). - Zak Seidov, Jan 07 2014
There are several interesting computer generated conjectures for this sequence at Jon Maiga's Sequence Machine site. - Antti Karttunen, Dec 07 2021
Note that 5, p, 2p - 5 form an arithmetic progression (PAP-3). - Charles R Greathouse IV, Mar 03 2025

Examples

			29 is in the sequence since p = 29 is prime and 2*p - 5 = 53 is also prime.
		

Crossrefs

Subsequence of A007528 and hence A016969.

Programs

  • Magma
    [p: p in PrimesUpTo(2000) | IsPrime(2*p-5)]; // Vincenzo Librandi, Feb 25 2016
  • Mathematica
    Select[Prime[Range[500]],PrimeQ[2#-5]&] (* Harvey P. Dale, Oct 10 2011 *)
  • PARI
    { n=0; p=1; for (m=1, 10^9, p=nextprime(p+1); if (isprime(2*p - 5), write("b063909.txt", n++, " ", p); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 02 2009
    
  • PARI
    isA063909(p) = ((p%2)&&isprime(p)&&isprime(p+p-5)); \\ Antti Karttunen, Dec 07 2021
    
  • PARI
    list(lim)=my(v=List()); forprimestep(p=5,lim\1,6, if(isprime(2*p-5), listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Mar 03 2025
    

Formula

Intersection of A089253 and A000040. - Michael B. Porter, Jan 07 2014
a(n) = (A145471(n)+5)/2. [Also listed by Sequence Machine, and obviously true] - Antti Karttunen, Dec 07 2021

A108164 Semiprimes p*q where both p and q are primes of the form 6n+1 (A002476).

Original entry on oeis.org

49, 91, 133, 169, 217, 247, 259, 301, 361, 403, 427, 469, 481, 511, 553, 559, 589, 679, 703, 721, 763, 793, 817, 871, 889, 949, 961, 973, 1027, 1057, 1099, 1141, 1147, 1159, 1261, 1267, 1273, 1333, 1339, 1351, 1369, 1387, 1393, 1417, 1477, 1501, 1561, 1591
Offset: 1

Views

Author

Jonathan Vos Post, Jun 13 2005

Keywords

Comments

These are the products of terms from A107890 excluding multiples of 3.
Every semiprime not divisible by 2 or 3 must be in one of these three disjoint sets:
A108164 = the product of two primes of the form 6n+1 (A002476),
A108166 = the product of two primes of the form 6n-1 (A007528),
A108172 = the product of a prime of the form 6n+1 and a prime of the form 6n-1.
The product of two primes of the form 6n+1 is a semiprime of the form 6n+1.

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.

Crossrefs

Programs

  • Maple
    N:= 2000: # To get all terms <= N
    P:= select(isprime, [seq(i,i=7..N/7, 6)]):
    sort(select(`<=`,[seq(seq(P[i]*P[j],j=1..i),i=1..nops(P))],N)); # Robert Israel, Dec 27 2018
  • Mathematica
    With[{nn=50},Take[Times@@@Tuples[Select[6*Range[nn]+1,PrimeQ],2]// Union,nn]] (* Harvey P. Dale, May 20 2021 *)

Formula

{a(n)} = {p*q where both p and q are in A002476}.

Extensions

Edited and extended by Ray Chandler, Oct 15 2005

A144313 Prime numbers p such that p - 1 is the fourth a-figurate number, seventh b-figurate number and possibly tenth c-figurate number for some a, b and c and not a d-figurate number for any nontrivial d.

Original entry on oeis.org

29, 71, 113, 239, 281, 449, 491, 659, 701, 827, 911, 953, 1373, 1499, 1583, 1667, 1709, 1877, 2003, 2087, 2129, 2213, 2339, 2423, 2549, 2591, 2633, 2801, 2843, 2969, 3221, 3347, 3389, 3557, 3767, 3851, 4229, 4271, 4397, 4481, 4649, 4691, 4733, 5153, 5279
Offset: 1

Views

Author

Reikku Kulon, Sep 17 2008

Keywords

Comments

Appears to be necessarily a subset of A007528.
The 46th Mersenne prime exponent (Mpe, A000043) 43112609 is a member: 43112608 is the fourth 7185436-figurate number and the seventh 2052983-figurate number and is not a k-figurate number for any other k except 43112608 (trivially). Several other Mersenne prime exponents are members of this sequence.
It is conjectured:
- that this sequence is infinite;
- that there is a unique set {4, 7, 10, 16, ...} (A138694?) giving the possible orders in k-figurate numbers for the set S of all Mpe for which Mpe - 1 is a (4, 7) or (4, 10) k-figurate number;
- that the ratio of Mpe in this sequence to those not approaches a nonzero value;
- that a characteristic function f(n) exists which equals 1 iff n is in S.
Contribution from Reikku Kulon, Sep 18 2008: (Start)
Subset of the integers n such that n is congruent to 29 modulo 42. The case where p - 1 is a tenth c-figurate number occurs when p is also congruent to 281 modulo 630.
The first three primes where c is defined are 281, 911 and 2801, with c = 8, 22, 64; c is congruent to 8 modulo 14. All such primes are necessarily congruent to 1 modulo 10.
The first invalid values of c are 36 and 50, which correspond to the semiprimes 1541 = 23 * 67 and 2171 = 13 * 167. Both of these are members of A071331 and A098237. The next invalid value of c, 78, corresponds to 3431 = 47 * 73, once again a member of both sequences.
The first primes where a, b, c and d are all defined (which therefore excludes them from this sequence) are the consecutive 6581, 7211 and 7841, all members of A140856, A140732, A142076, A142317 and A142905. (End)

Crossrefs

Contribution from Reikku Kulon, Sep 18 2008: (Start)
Cf. A071331, A098237 (semiprimes)
Cf. A140856, A140732, A142076, A142317, A142905 (a, b, c and d all defined) (End)

A163847 Starting from a(1)=13, a(n+1) is the smallest prime > a(n) such that 2*a(n) - a(n+1) is also prime.

Original entry on oeis.org

13, 19, 31, 43, 67, 73, 79, 97, 127, 151, 163, 199, 241, 271, 313, 349, 367, 397, 421, 433, 457, 541, 619, 631, 643, 673, 727, 811, 853, 877, 967, 997, 1087, 1123, 1129, 1171, 1213, 1297, 1303, 1327, 1423, 1447, 1471, 1483, 1543, 1597, 1627, 1657, 1693
Offset: 1

Views

Author

Keywords

Comments

This is: select the prime a(n+1) = a(n)+d such that at a(n)-d is another prime at the same distance to but at the opposite side of a(n).
It seems all these primes are in the class 1 (mod 6), that is, in A002476 as opposed to A007528.

Examples

			For a(2), the first candidate is the prime 17=13+4, which is not selected because 13-4=9 is not prime.
The next larger candidate is the prime 13+6=19, which is selected as a(2) because 13-6=7 is also prime.
For a(3) the first candidate is the prime 19+4=23, which is not selected because 19-4=15 is not prime.
The next candidate is the prime 19+10=29, which is not selected because the 19-10=9 is not prime.
The next larger candidate, the prime 19+12=31 is selected as a(3), because 19-12=7 is prime.
		

Crossrefs

Programs

  • Maple
    A163847 := proc(n) option remember; if n = 1 then 13; else for a from procname(n-1)+2 by 2 do if isprime(a) and isprime( 2*procname(n-1)-a) then RETURN(a) ; fi; od: fi; end:
    seq(A163847(n),n=1..80) ; # R. J. Mathar, Aug 29 2009
  • Mathematica
    DeltaPrimePrevNext[n_]:=Module[{d, k1, k2}, k1=n-1; k2=n+1; While[ !PrimeQ[k1] || !PrimeQ[k2], k2++; k1-- ]; d=k2-n]; lst13={}; p=13; Do[If[p-DeltaPrimePrevNext[p]>1, AppendTo[lst13, p]; p=p+DeltaPrimePrevNext[p]],{n, 7!}]; lst13
    (* Second program: *)
    k=6
    n=1
    Do[If[m==6, Print[n, " ", 13]]; If[m==k, n=n+1; Do[If[PrimeQ[2Prime[m]-Prime[j]]==True, k=j; Print[n, " ", Prime[j]]; Goto[aa]], {j, m+1, PrimePi[2Prime[m]]}]]; Label[aa]; Continue, {m, 6, 1000}] (* Zhi-Wei Sun, Feb 25 2013 *)
    sp[p_]:=Module[{p1=NextPrime[p]},While[!PrimeQ[2p-p1],p1=NextPrime[p1]];p1]; NestList[ sp,13,50] (* Harvey P. Dale, Aug 09 2023 *)
  • PARI
    first(n) = { my(res = vector(n)); res[1] = 13; for(x=2, n, forprime(p=res[x-1]+1, , if(ispseudoprime(2*res[x-1] - p), res[x]=p; break()))); res; } \\ Iain Fox, Nov 18 2017

Extensions

Definition and comment rephrased by R. J. Mathar, Aug 29 2009

A211890 Triangle read by rows, where row n starts with n-th prime, followed by n primes in arithmetic progression; T(0,0) = 1 by convention.

Original entry on oeis.org

1, 2, 3, 3, 5, 7, 5, 11, 17, 23, 7, 37, 67, 97, 127, 11, 71, 131, 191, 251, 311, 13, 244243, 488473, 732703, 976933, 1221163, 1465393, 17, 6947, 13877, 20807, 27737, 34667, 41597, 48527, 19, 546859, 1093699, 1640539, 2187379, 2734219, 3281059, 3827899
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 13 2012

Keywords

Comments

T(n,0) = A000040(n) and T(n,k+1) - T(n,k) = A211889(n), 0 <= k < n.

Examples

			First 9 rows of triangle:
0:  1
1:  2 3
2:  3 5 7
3:  5 11 17 23
4:  7 37 67 97 127
5:  11 71 131 191 251 311
6:  13 244243 488473 732703 976933 1221163 1465393
7:  17 6947 13877 20807 27737 34667 41597 48527
8:  19 546859 1093699 1640539 2187379 2734219 3281059 3827899 4374739
		

Crossrefs

Programs

  • Haskell
    a211890 n k = a211890_tabl !! n !! k
    a211890_row n = a211890_tabl !! n
    a211890_tabl = zipWith3 (\p k row -> map ((+ p) . (* k)) row)
                            a008578_list (0 : a211889_list) a002262_tabl
Previous Showing 31-40 of 128 results. Next