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 20 results.

A192133 Difference of base and exponent of prime powers (cf. A000961).

Original entry on oeis.org

1, 1, 2, 0, 4, 6, -1, 1, 10, 12, -2, 16, 18, 22, 3, 0, 28, 30, -3, 36, 40, 42, 46, 5, 52, 58, 60, -4, 66, 70, 72, 78, -1, 82, 88, 96, 100, 102, 106, 108, 112, 9, 2, 126, -5, 130, 136, 138, 148, 150, 156, 162, 166, 11, 172, 178, 180, 190, 192, 196, 198, 210
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Comments

a(1) = 1 by convention, in accordance with A025473(1) = 1 and A025474(1) = 0.

Crossrefs

A006093 and A090076 are subsequences.

Programs

  • Mathematica
    s[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, f[[1, 1]] - f[[1, 2]], Nothing]]; s[1] = 1; Array[s, 250] (* Amiram Eldar, May 16 2025 *)

Formula

a(n) = A025473(n)-A025474(n) = A192134(n)*A025473(n)/A000961(n).

A216124 Primes which are the nearest integer to the geometric mean of the previous prime and the following prime.

Original entry on oeis.org

3, 5, 7, 23, 53, 157, 173, 211, 257, 263, 373, 563, 593, 607, 653, 733, 947, 977, 1103, 1123, 1187, 1223, 1367, 1511, 1747, 1753, 1907, 2287, 2417, 2677, 2903, 2963, 3307, 3313, 3637, 3733, 4013, 4409, 4457, 4597, 4657, 4691, 4993, 5107, 5113, 5303, 5387, 5393
Offset: 1

Views

Author

César Eliud Lozada, Sep 01 2012

Keywords

Comments

The geometric mean of two primes p and q is sqrt(pq).

Examples

			The prime before 3 is 2 and the prime after 3 is 5. 2 * 5 = 10 and the geometric mean of 2 and 5 is therefore sqrt(10) = 3.16227766..., which rounds to 3. Therefore 3 is in the sequence.
The geometric mean of 7 and 13 is 9.539392... which rounds up to 10, well short of 11, hence 11 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    A := {}: for n from 2 to 1000 do p1 := ithprime(n-1): p := ithprime(n); p2 := ithprime(n+1): if p = round(sqrt(p1*p2)) then A := `union`(A, {p}) end if end do; A := A;
  • Mathematica
    Prime[Select[Range[2, 700], Prime[#] == Round[Sqrt[Prime[# - 1] Prime[# + 1]]] &]] (* Alonso del Arte, Sep 01 2012 *)
    Select[Partition[Prime[Range[750]],3,1],Round[GeometricMean[{#[[1]],#[[3]]}]]==#[[2]]&][[;;,2]] (* Harvey P. Dale, Feb 28 2024 *)
  • PARI
    lista(nn) = forprime (p=2, nn, if (round(sqrt(precprime(p-1)*nextprime(p+1))) == p, print1(p, ", "))); \\ Michel Marcus, Apr 08 2015
    
  • Python
    from math import isqrt
    from itertools import islice
    from sympy import nextprime, prevprime
    def A216124_gen(startvalue=3): # generator of terms >= startvalue
        q = max(3,nextprime(startvalue-1))
        p = prevprime(q)
        r = nextprime(q)
        while True:
            if q == (m:=isqrt(k:=p*r))+(k-m*(m+1)>=1):
                yield q
            p, q, r = q, r, nextprime(r)
    A216124_list = list(islice(A216124_gen(),20)) # Chai Wah Wu, Jun 19 2024

Extensions

More terms from Michel Marcus, Apr 08 2015

A276942 Square array A(row,col): A(row,1) = A276937(row), and for col > 1, A(row,col) = A003961(A(row,col-1)), read by descending antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Original entry on oeis.org

2, 3, 6, 5, 15, 9, 7, 35, 25, 10, 11, 77, 49, 21, 14, 13, 143, 121, 55, 33, 18, 17, 221, 169, 91, 65, 75, 22, 19, 323, 289, 187, 119, 245, 39, 26, 23, 437, 361, 247, 209, 847, 85, 51, 30, 29, 667, 529, 391, 299, 1859, 133, 95, 105, 34, 31, 899, 841, 551, 493, 3757, 253, 161, 385, 57, 38, 37, 1147, 961, 713, 589, 6137, 377, 319, 1001, 115, 69, 42
Offset: 2

Views

Author

Antti Karttunen, Sep 25 2016

Keywords

Comments

The starting offset is 2 because 1 is not included in the array proper. With it the terms are a permutation of A276078.
All terms on each row have the same prime signature.

Examples

			The top left corner of the array:
   2,  3,  5,   7,  11,  13,  17,  19,  23,   29,   31,   37,   41,   43
   6, 15, 35,  77, 143, 221, 323, 437, 667,  899, 1147, 1517, 1763, 2021
   9, 25, 49, 121, 169, 289, 361, 529, 841,  961, 1369, 1681, 1849, 2209
  10, 21, 55,  91, 187, 247, 391, 551, 713, 1073, 1271, 1591, 1927, 2279
  14, 33, 65, 119, 209, 299, 493, 589, 851, 1189, 1333, 1739, 2173, 2537
		

Crossrefs

Transpose: A276941.
Leftmost column: A276937, second column: A276938.
Rows from the top: A000040, A006094, A001248 (from 9 onward), A090076, A090090.
Cf. A003961.
Cf. A276078 (sorted into ascending order).
Cf. also A276075, A276955.

Programs

Formula

A(row,1) = A276937(row); for col > 1, A(row,col) = A003961(A(row,col-1)).

A302047 a(n) = 1 if n = prime(k)*prime(2+k) for some k, otherwise 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Apr 24 2018

Keywords

Comments

Characteristic function for prime(n)*prime(n+2) (A090076).

Crossrefs

Programs

  • Mathematica
    Array[Boole@ And[Length@ # == 2, Max@ #[[All, -1]] == 1, Subtract @@ PrimePi[#[[All, 1]]] == -2 ] &@ FactorInteger@ # &, 120] (* or *)
    With[{s = Array[Prime[#] Prime[# + 2] &, 5]}, ReplacePart[ConstantArray[0, Max@ s], Map[# -> 1 &, s] ] ] (* Michael De Vlieger, Apr 27 2018 *)
    Module[{pp2=Table[Prime[n]Prime[n+2],{n,5}],nn},nn=Max[pp2];Table[ If[ MemberQ[ pp2,k],1,0],{k,nn}]] (* Harvey P. Dale, Dec 13 2021 *)
  • PARI
    A302047(n) = if((2!=bigomega(n))||(2!=omega(n)),0,my(f=factor(n)); (f[2,1] == nextprime(1+nextprime(1+f[1,1]))));

Formula

a(n) = A185015(A246277(n)).

A226502 Let P(k) denote the k-th prime (P(1)=2, P(2)=3 ...); a(n) = P(n+1)P(n+3) - P(n)P(n+2).

Original entry on oeis.org

11, 34, 36, 96, 60, 144, 160, 162, 360, 198, 320, 336, 352, 494, 460, 720, 378, 560, 718, 450, 972, 1020, 938, 1002, 816, 420, 864, 1752, 960, 2596, 810, 2204, 576, 2404, 1220, 1606, 1980, 1694, 1420, 2876, 744, 2694, 780, 3160, 2810, 3520, 3170, 1824, 1840, 1422, 3836
Offset: 1

Views

Author

Ed Smiley, Jun 09 2013

Keywords

Comments

Differences of the products of alternate primes.

Crossrefs

First differences of A090076.

Programs

  • Mathematica
    #[[2]]#[[4]]-#[[1]]#[[3]]&/@Partition[Prime[Range[60]],4,1] (* Harvey P. Dale, Jul 14 2025 *)
  • PARI
    p=2;q=3;r=5;forprime(s=7,1e2,print1(q*s-p*r", ");p=q;q=r;r=s) \\ Charles R Greathouse IV, Jun 10 2013

Formula

a(n) >> n log n and this is probably sharp: on Dickson's conjecture there are infinitely many a(n) < kn log n for any k > 4. The constant 4 comes from 8 + 2 - 6 - 0 n the prime quadruplet (p+0, p+2, p+6, p+8). On Cramér's conjecture a(n) = O(n log^3 n). Unconditionally a(n) << n^1.525 log n. - Charles R Greathouse IV, Jun 10 2013

A333747 Numbers that are either the product of two consecutive primes or two primes with a prime in between.

Original entry on oeis.org

6, 10, 15, 21, 35, 55, 77, 91, 143, 187, 221, 247, 323, 391, 437, 551, 667, 713, 899, 1073, 1147, 1271, 1517, 1591, 1763, 1927, 2021, 2279, 2491, 2773, 3127, 3233, 3599, 3953, 4087, 4331, 4757, 4891, 5183, 5609, 5767, 6059, 6557, 7031, 7387, 8051, 8633, 8989, 9797, 9991
Offset: 1

Views

Author

Bobby Jacobs, Apr 03 2020

Keywords

Comments

In other words, these are numbers that are the product of two distinct primes whose prime indices differ by at most two.

Crossrefs

Programs

  • Maple
    R:= NULL;
    p:= 2; q:= 3;
    for n from 1 to 100 by 2 do
      r:= nextprime(q);
      R:= R, p*q, p*r;
      p:= q; q:= r;
    od:
    R; # Robert Israel, Apr 22 2020
  • Mathematica
    a[n_] := Prime[Ceiling[n/2]] * Prime[Ceiling[(n + 3)/2]]; Array[a, 50] (* Amiram Eldar, Apr 04 2020 *)

Formula

Union of A006094 and A090076.
a(n) = prime(ceiling(n/2))*prime(ceiling((n+3)/2)).
a(2*n-1) = prime(n)*prime(n+1).
a(2*n) = prime(n)*prime(n+2).

A096968 a(n) = (prime(n)*prime(n+2))^4.

Original entry on oeis.org

10000, 194481, 9150625, 68574961, 1222830961, 3722098081, 23372600161, 92173567201, 258439040161, 1325558466241, 2609649624481, 6407383500961, 13788812262241, 26975984333281, 59128856241841, 109250345339521
Offset: 1

Views

Author

Pierre CAMI, Aug 19 2004

Keywords

Examples

			a(1) = (prime(1)*prime(3))^4 = 10000.
		

Crossrefs

Equals A090076(n)^4.

Programs

  • Mathematica
    a[n_] := (Prime[n]*Prime[n + 2])^4; Table[ a[n], {n, 15}] (* Robert G. Wilson v, Aug 22 2004 *)

Extensions

More terms from Robert G. Wilson v, Aug 22 2004

A141078 a(n) = abs(prime(n)*prime(n+4) - prime(n+1)*prime(n+3)).

Original entry on oeis.org

1, 16, 6, 54, 6, 14, 24, 10, 130, 24, 134, 34, 140, 150, 84, 190, 24, 72, 48, 260, 50, 72, 440, 468, 234, 186, 990, 174, 130, 1692, 714, 632, 520, 736, 270, 96, 96, 390, 584, 800, 330, 1608, 1894, 1472, 342, 2326, 1904, 406, 24, 1326, 108, 920, 1184, 1112, 84, 610
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 05 2008

Keywords

Examples

			a(4) = abs(prime(4)*prime(4+4) - prime(4+1)*prime(4+3)) = abs(7*19 - 11*17) = abs(133 - 187) = abs(-54) = 54.
		

Crossrefs

Cf. A090076.

Programs

  • GAP
    P:=Filtered([1..300],IsPrime);;
    List([1..56], n->AbsInt(P[n]*P[n+4]-P[n+1]*P[n+3])); # Muniru A Asiru, Feb 09 2018
  • Maple
    p:=ithprime: seq(abs(p(n)*p(n+4)-p(n+1)*p(n+3)),n=1..60); # Emeric Deutsch, Aug 14 2008
  • Mathematica
    a[n_]:=Abs[Prime[n]*Prime[n+4]-Prime[n+1]*Prime[n+3]];Array[a,56] (* James C. McMahon, Jul 23 2025 *)

Extensions

Corrected and extended by Emeric Deutsch, Aug 14 2008

A176098 a(n) = prime(n) times the n-th nonnegative noncomposite.

Original entry on oeis.org

0, 3, 10, 21, 55, 91, 187, 247, 391, 551, 713, 1073, 1271, 1591, 1927, 2279, 2773, 3233, 3953, 4331, 4891, 5609, 6059, 7031, 8051, 8989, 9991, 10807, 11227, 12091, 13843, 14803, 17399, 18209, 20413, 20989, 23393, 24613, 26219, 28199, 29893, 31313
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 08 2010

Keywords

Examples

			a(5) = prime(5)*(nonnegative noncomposite(5)) = 11*5 = 55.
		

Crossrefs

Essentially the same as A090076.

Formula

a(n) = A000040(n)*A158611(n).

Extensions

Entries checked by R. J. Mathar, Apr 16 2010

A348569 a(n) = (prime(n) + prime(n+2))^2 + prime(n+1)^2.

Original entry on oeis.org

58, 125, 305, 521, 953, 1313, 1961, 2833, 3757, 5317, 6553, 8081, 9593, 11425, 14045, 16477, 19597, 21913, 24641, 27829, 30577, 35113, 40321, 45509, 50201, 53873, 56393, 60281, 68465, 75665, 86857, 91669, 101117, 106301
Offset: 1

Views

Author

Burak Muslu, Oct 23 2021

Keywords

Comments

The square of the shortest distance between the start and end points of the path followed by a person moving 90 degrees left and right (or left and right) at the end of each path on a path of three consecutive prime numbers.

Examples

			For n = 1 the a(1) = (prime(1) + prime(3))^2 + prime(2)^2 = (2 + 5)^2 + 3^2 = 49 + 9 = 58.
		

Crossrefs

Programs

  • Mathematica
    Table[(Prime[n] + Prime[n + 2])^2 + Prime[n + 1]^2,{n,34}]

Formula

a(n) = prime(n)^2 + prime(n+1)^2 + prime(n+2)^2 + 2*prime(n)*prime(n+2).
Previous Showing 11-20 of 20 results.