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

A069485 Greatest prime factor of prime(n+1)^2 + prime(n)^2.

Original entry on oeis.org

13, 17, 37, 17, 29, 229, 13, 89, 137, 53, 233, 61, 353, 2029, 193, 37, 277, 821, 953, 61, 89, 101, 1481, 1733, 53, 2081, 269, 2333, 29, 14449, 3329, 3593, 293, 1597, 22501, 73, 25609, 373, 28909, 6197, 32401, 389, 101, 2237, 7841, 42061, 29, 257, 281, 821
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 29 2002

Keywords

Comments

How small can members of this sequence be? For example, a(52837) = 97 since 650107^2 + 650099^2 = 2 * 5^4 * 29 * 37 * 73 * 89 * 97. - Charles R Greathouse IV, May 14 2014

Examples

			A069482(10) = A000040(11)^2 + A000040(10)^2 = 29^2 + 31^2 = 841 + 961 = 1802 = 2*17*53, therefore a(10) = 53.
		

Crossrefs

Cf. A069483.

Programs

  • Maple
    seq(max(map2(op,1,ifactors(ithprime(i+1)^2 + ithprime(i)^2)[2])), i=1..1000); # Robert Israel, May 18 2014
  • Mathematica
    Table[ FactorInteger[ Prime[n + 1]^2 + Prime[n]^2] [[ -1, 1]], {n, 1, 50} ]
    FactorInteger[#][[-1,1]]&/@Total/@Partition[Prime[Range[60]]^2,2,1] (* Harvey P. Dale, Jul 08 2019 *)
  • PARI
    gpf(n)=my(f=factor(n)[,1]); f[#f]
    a(n)=my(p=prime(n)); gpf(nextprime(p+1)^2 + p^2) \\ Charles R Greathouse IV, May 14 2014

Formula

a(n) = A006530(A069484(n)).

Extensions

Edited and extended by Robert G. Wilson v, Apr 18 2002

A113396 a(n) = -prime(n)^2 (mod prime(n+1)).

Original entry on oeis.org

2, 1, 3, 6, 9, 1, 15, 7, 22, 27, 1, 25, 39, 31, 17, 23, 57, 31, 55, 69, 43, 67, 53, 33, 85, 99, 91, 105, 97, 58, 115, 101, 135, 49, 147, 121, 127, 151, 137, 143, 177, 91, 189, 181, 195, 67, 79, 211, 225, 217, 203, 237, 151
Offset: 1

Views

Author

Marian Kraus, Oct 26 2005

Keywords

Examples

			-2^2 == 2 (mod 3); -3^2 == 1 (mod 5); -5^2 == 3 (mod 7); -7^2 == 6 (mod 11); etc.
		

Crossrefs

Programs

  • Mathematica
    Mod[#[[2]]^2-#[[1]]^2,#[[2]]]&/@Partition[Prime[Range[60]],2,1] (* Harvey P. Dale, Nov 10 2014 *)
  • PARI
    vector(55,n,(-prime(n)^2)%prime(n+1)) \\ Joerg Arndt, Sep 09 2024

Formula

a(n) = prime(n+1) - A167770(n). - Jason Yuen, Sep 08 2024

Extensions

Name simplified by Joerg Arndt, Sep 09 2024

A157492 Apply partial sum operator twice to sequence of squares of the first n primes.

Original entry on oeis.org

4, 17, 55, 142, 350, 727, 1393, 2420, 3976, 6373, 9731, 14458, 20866, 29123, 39589, 52864, 69620, 90097, 115063, 145070, 180406, 221983, 270449, 326836, 392632, 468629, 555235, 653290, 763226, 885931, 1024765, 1180760, 1355524, 1549609
Offset: 1

Views

Author

Keywords

Crossrefs

Partial sums of A024450.

Programs

  • Maple
    ListTools:-PartialSums(ListTools:-PartialSums([seq(ithprime(i)^2,i=1..100)])); # Robert Israel, May 14 2019
  • Mathematica
    s0=s1=0;lst={};Do[p=Prime[n];s0+=p^2;s1+=s0;AppendTo[lst,s1],{n,5!}];lst
    Nest[Accumulate,Prime[Range[40]]^2,2] (* Harvey P. Dale, Jan 01 2020 *)

A257514 Transpose of square array A257513.

Original entry on oeis.org

1, 2, 5, 2, 16, 9, 4, 24, 20, 13, 2, 72, 42, 34, 17, 4, 48, 66, 36, 38, 21, 2, 120, 78, 96, 54, 52, 25, 4, 72, 102, 60, 90, 48, 56, 29, 6, 168, 114, 144, 90, 120, 66, 70, 33, 2, 312, 230, 160, 194, 124, 158, 88, 74, 37, 6, 120, 232, 162, 96, 150, 84, 138, 92, 88, 41, 4, 408, 248, 360, 262, 176, 226, 140, 190, 114, 92, 45
Offset: 1

Views

Author

Antti Karttunen, May 01 2015

Keywords

Comments

The array is read by downwards antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...
See A257513.

Examples

			The top left corner of the array:
   1,   2,   2,   4,   2,   4,   2,   4,   6,   2,   6,   4,   2,   4,   6
   5,  16,  24,  72,  48, 120,  72, 168, 312, 120, 408, 312, 168, 360, 600
   9,  20,  42,  66,  78, 102, 114, 230, 232, 248, 370, 246, 258, 470, 636
  13,  34,  36,  96,  60, 144, 160, 162, 360, 198, 320, 336, 352, 494, 460
  17,  38,  54,  90,  90, 194,  96, 262, 338, 144, 406, 434, 364, 330, 684
  21,  52,  48, 120, 124, 150, 176, 240, 304, 210, 504, 458, 204, 526, 614
  25,  56,  66, 158,  84, 226, 150, 210, 374, 280, 540, 318, 380, 456, 532
  29,  70,  88, 138, 140, 216, 120, 264, 456, 292, 428, 490, 306, 378, 756
  33,  74,  92, 190, 126, 198, 162, 326, 492, 180, 588, 432, 228, 574, 686
  37,  88, 114, 192, 108, 240, 208, 350, 412, 308, 550, 366, 404, 504, 816
  41,  92, 132, 186, 138, 290, 220, 282, 540, 258, 500, 538, 330, 614, 958
  45, 106, 126, 216, 172, 314, 156, 382, 518, 204, 660, 480, 424, 732, 794
  49, 110, 144, 254, 184, 270, 236, 360, 484, 332, 622, 578, 522, 576, 712
  53, 124, 138, 306, 144, 346, 210, 330, 612, 282, 720, 684, 366, 498, 830
  57, 128, 156, 300, 200, 336, 180, 430, 590, 352, 830, 552, 288, 600, 748
  ...
		

Crossrefs

Transpose of A257513.
Column 1: A016813.
Row 1: A001223, Row 2: A069482, Row 3: A109805, Row 4: A226502 (apart from the first term).
Cf. also A083140, A083221, A257252.

Programs

A104588 Product of primes less than or equal to sqrt(n).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210
Offset: 1

Views

Author

Lekraj Beedassy, Mar 17 2005

Keywords

Programs

Formula

a(n) = A034386(A000196(n)).
For n>0, #p(n) appears {(p(n+1))^2 - (p(n))^2} times [from n=(p(n))^2 to n=(p(n+1))^2 - 1, inclusive], i.e. A002110(n) appears A069482(n) times [from n=A001248(n) to n=A001248(n+1)-1, inclusive]

A347338 a(n) is the smallest number k such that tau(k) = tau(k+n), and there is no number m, k < m < k+n such that tau(m) = tau(k).

Original entry on oeis.org

2, 3, 35, 7, 4, 12, 39, 20, 146, 30, 52, 32, 175, 88, 693, 9, 99, 108, 188, 847, 1014, 392, 124, 25, 315, 234, 195, 416, 196, 477, 225, 48, 2262, 1327, 1330, 252, 368, 160, 1636, 640, 5067, 168, 441, 884, 1183, 1064, 1377, 120, 1328, 112, 4908, 3872, 891, 396, 512
Offset: 1

Views

Author

David James Sycamore, Aug 27 2021

Keywords

Comments

The prohibition in the definition distinguishes this sequence from A065559. This sequence identifies the first occurrence of a gap between numbers with the same tau, where no intervening number has that tau. Each tau t > 1 has a corresponding sequence of gaps (e.g., for t = 2, A001223, for t = 3, A069482), and a(n) is the smallest index of terms in A000005 corresponding to the first occurrence of a gap of length n in all of these (same tau) gap sequences.
A number appearing in this sequence cannot appear again, and many numbers do not appear at all (1 is not in because it is the only number with 1 divisor; 5 6 and 8 are not in because 3 is already a term; 10 is not in because 7 is a term, etc.).

Examples

			a(1) = 2 because 2 is the smallest k such that tau(k) = tau(k+1); a(2) = 3 because it is the smallest k with tau(k) = tau(k+2) with no intervening same tau number; a(3) = 35 because d(35) = 4, d(36) = 9, d(37) = 2, d(38) = 4 = d(35) and this is the least case of a gap of 3. (Here d means tau, namely, A000005.)
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {}, k, d = DivisorSigma[0, Range[2^14]]}, Do[k = 1; While[Or[#[[1]] != #[[-1]], Count[#, #[[1]]] > 2] &@ d[[k ;; k + n]], k++]; AppendTo[a, k], {n, 55}]; a] (* Michael De Vlieger, Aug 27 2021 *)
  • PARI
    a(n) = {my(i); for(i = 1, oo, if(iscan(i, n), return(i) ) ) }
    iscan(k, n) = { my(c); c = numdiv(k); if(numdiv(k + n) != c, return(0) ); for(i = 1, n-1, if(numdiv(k + i) == c, return(0) ) ); 1 } \\ David A. Corneth, Aug 27 2021
    
  • Python
    from sympy import divisor_count
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def tau(n): return divisor_count(n)
    def a(n):
        k = 2
        while True:
            while tau(k) != tau(k+n): k += 1
            if not any(tau(m) == tau(k) for m in range(k+1, k+n)): return k
            k += 1
    print([a(n) for n in range(1, 56)]) # Michael S. Branicky, Aug 27 2021

A117069 Leading terms in rows obtained by repeatedly computing consecutive absolute differences, starting with the squares of prime numbers.

Original entry on oeis.org

5, 11, 3, 37, 21, 13, 5, 3, 13, 5, 3, 5, 11, 3, 5, 11, 5, 11, 5, 3, 5, 107, 91, 59, 43, 27, 11, 5, 11, 669, 11, 621, 13, 499, 13, 451, 13, 355, 13, 331, 11, 213, 13, 163, 11, 69, 13, 19, 13, 5, 11, 3, 5, 3, 5, 3, 5, 3, 5, 11, 5, 195, 19, 157, 19, 61, 19, 61, 19, 3, 5, 3, 13, 5, 3, 5, 11
Offset: 1

Views

Author

Joseph L. Pe, Apr 17 2006

Keywords

Comments

In the first million rows, only 70767 leading terms are composite.
It is conjectured that for any positive integer n, the number of prime leading elements in the first n rows is greater than the number of composite leading elements (Pe's conjecture).
Preliminary investigations have led me to make the following generalization of the Gilbreath's and Pe's conjectures: For a fixed positive integer n, let T(n) be the table of consecutive absolute differences of the n-th powers of primes. Then the number of k-almost prime leading elements, 0 < k < n, is greater than the number of leading elements that are not of this form. Recall that a number is called k-almost prime if the sum of the exponents in its prime factorization equals k. Thus a 0-almost prime equals 1, a 1-almost prime is a prime number and a 2-almost prime is a semiprime. If n = 1, we have a weak form of Gilbreath's conjecture and if n = 2, we have Pe's conjecture.
There is a more general conjecture due to Croft and others, mentioned in Guy's book, that the Gilbreath property will hold for any sequence of odd numbers (but with an initial term 2) that does not increase too fast. - N. J. A. Sloane, Apr 18 2006

Examples

			Start with the sequence of squares of primes:
4, 9, 25, 49, 121, ....
Take the absolute values of differences between consecutive terms:
5, 16, 24, 72, ....
Repeat this operation successively:
11, 8, 48, ....
3, 40, ....
....
a(n) consists of the leading terms of the rows of differences above.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Section A10.
  • Joseph L. Pe, "On the Absolute Difference Table of Squares of Primes", Journal of Recreational Mathematics 33 (3) (2004/2005) 176-179.

Crossrefs

Cf. A001248 (1st row), A069482 (2nd row).

Programs

  • Mathematica
    A117069[nmax_]:=Module[{d=Prime[Range[nmax+1]]^2},Table[First[d=Abs[Differences[d]]],nmax]];A117069[200] (* Paolo Xausa, May 14 2023 *)

A157493 Apply partial sum operator thrice to sequence of squares of the first n primes.

Original entry on oeis.org

4, 21, 76, 218, 568, 1295, 2688, 5108, 9084, 15457, 25188, 39646, 60512, 89635, 129224, 182088, 251708, 341805, 456868, 601938, 782344, 1004327, 1274776, 1601612, 1994244, 2462873, 3018108, 3671398, 4434624, 5320555, 6345320
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    s0=s1=s2=0; Table[s0+=Prime[n]^2; s1+=s0; s2+=s1, {n,100}]
    Nest[Accumulate,Prime[Range[40]]^2,3]  (* Harvey P. Dale, Jan 27 2011 *)

A173897 a(n) is the number of Sophie Germain primes (A005384) between prime(n)^2 and prime(n+1)^2.

Original entry on oeis.org

1, 2, 2, 4, 1, 7, 2, 5, 9, 2, 8, 9, 2, 10, 12, 12, 4, 16, 7, 6, 14, 11, 19, 16, 10, 6, 11, 9, 11, 49, 11, 18, 6, 43, 10, 21, 18, 15, 25, 21, 7, 43, 11, 19, 12, 53, 55, 18, 9, 20, 35, 9, 50, 31, 32, 28, 4, 38, 23, 15, 65, 74, 17, 12, 27, 90, 38, 63, 13, 29, 38, 51, 46, 39, 27, 38, 47, 28
Offset: 1

Views

Author

Jaspal Singh Cheema, Mar 01 2010

Keywords

Comments

If you graph a(n) versus n, an interesting pattern emerges. As you go farther along the n-axis, greater are the number of Sophie Germain primes, on average, within each interval obtained. The smallest count of 1 occurs twice: between squares of (2,3) and (11,13). I suspect the number of Sophie Germain primes within each interval will never be zero. If one could prove that there is at least 1 Sophie Germain prime within each interval, this would imply that Sophie Germain primes are infinite.

Examples

			For n = 1, we consider the interval [2^2, 3^2], within which is one Sophie Germain prime, 5. Thus a(1) = 1.
		

Crossrefs

Cf. A005384.
Cf. A069482 (prime(n+1)^2 - prime(n)^2). - Zak Seidov, Sep 04 2016

Programs

  • PARI
    is_a005384(n) = ispseudoprime(2*n+1)
    a(n) = my(i=0); forprime(q=prime(n)^2, prime(n+1)^2, if(is_a005384(q) && q < prime(n+1)^2, i++)); i \\ Felix Fröhlich, Sep 04 2016
  • Sage
    A173897 = lambda n: len([p for p in prime_range(nth_prime(n)**2, nth_prime(n+1)**2) if is_prime(2*p+1)]) # D. S. McNeil, Dec 02 2010
    

Extensions

Edited by D. S. McNeil, Dec 02 2010

A229496 Primes p of the form prime(n+1)^2-prime(n)^2+1.

Original entry on oeis.org

17, 73, 73, 313, 409, 313, 601, 673, 241, 769, 1033, 1489, 409, 433, 3361, 1033, 1609, 601, 1321, 2113, 769, 5209, 1801, 2833, 3049, 3121, 1129, 2473, 1249, 2521, 6841, 4273, 4441, 4513, 3049, 6481, 8521, 5233, 3529, 3673, 11353, 6073, 2089, 6529, 6793, 2281, 7321
Offset: 1

Views

Author

K. D. Bajpai, Sep 25 2013

Keywords

Examples

			a(1)=17:  prime(2+1)^2-prime(2)^2+1= 17,  which is prime.
a(6)=313:  prime(12+1)^2-prime(12)^2+1= 313,  which is prime.
		

Crossrefs

Programs

  • Maple
    KD:= proc() local a,b,c,d; a:=ithprime(n+1)^2-ithprime(n)^2+1;if isprime(a) then RETURN(a): fi;end:seq(KD(),n=1..500);
  • Mathematica
    Select[Table[Prime[n + 1]^2 - Prime[n]^2 + 1, {n, 10^3}], PrimeQ[#] &]
    Select[#[[2]]-#[[1]]+1&/@Partition[Prime[Range[200]]^2,2,1],PrimeQ] (* Harvey P. Dale, May 21 2021 *)
  • PARI
    for(n=1,10^3,if(ispseudoprime(k=prime(n+1)^2-prime(n)^2+1),print1(k", ")))
Previous Showing 11-20 of 28 results. Next