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 71-80 of 83 results. Next

A045382 Primes congruent to {2, 7} mod 8.

Original entry on oeis.org

2, 7, 23, 31, 47, 71, 79, 103, 127, 151, 167, 191, 199, 223, 239, 263, 271, 311, 359, 367, 383, 431, 439, 463, 479, 487, 503, 599, 607, 631, 647, 719, 727, 743, 751, 823, 839, 863, 887, 911, 919, 967, 983, 991
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000040.

Programs

  • Magma
    [p: p in PrimesUpTo(1100) | p mod 8 in [2, 7]]; // Vincenzo Librandi, Aug 11 2012
  • Mathematica
    Select[Prime[Range[300]],MemberQ[{2, 7},Mod[#,8]]&] (* Vincenzo Librandi, Aug 11 2012 *)

Formula

a(n) = A007522(n), n >= 1. R. J. Mathar, Nov 22 2006

A121089 Numbers n such that f(n), f(n+1) and f(n+2) are prime, f(m)=72*m^2+7.

Original entry on oeis.org

9, 24, 169, 1479, 2964, 3039, 3299, 4084, 4474, 5534, 5574, 6449, 7359, 7409, 7529, 10789, 10879, 10994, 13819, 14324, 18574, 19709, 20329, 20749, 22179, 24529, 25089, 25104, 25229, 25404, 27714, 27779, 29849, 30234, 32369, 33384, 34799
Offset: 1

Views

Author

Zak Seidov, Aug 11 2006

Keywords

Comments

Apparently there are no four subsequent numbers m with f(m) prime.

Crossrefs

Programs

  • Mathematica
    Reap[Do[If[PrimeQ[72*n^2+7]&&PrimeQ[72*(n+1)^2+7]&&PrimeQ[72*(n+2)^2+7],Sow[n]],{n,0,300000}]][[2,1]]
    Flatten[Position[Partition[Table[PrimeQ[72n^2+7],{n,35000}],3,1],{True,True,True}]] (* Harvey P. Dale, Aug 17 2014 *)

A127598 Least primes of the form k 4^n + (4^n-1)/3.

Original entry on oeis.org

2, 5, 5, 149, 853, 2389, 17749, 70997, 218453, 2708821, 3495253, 13981013, 39146837, 492131669, 626349397, 27201459541, 27201459541, 297784399189, 297784399189, 3665038759253, 3665038759253, 89426945725781
Offset: 1

Views

Author

Artur Jasinski, Jan 19 2007

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[k = 0; While[ !PrimeQ[k 4^n + (4^n - 1)/3], k++ ]; AppendTo[a, k 4^n + (4^n - 1)/3], {n, 0, 50}]; a (*Artur Jasinski*)

A306431 Least number x > 1 such that n*x divides 1 + Sum_{k=1..x-1} k^(x-1).

Original entry on oeis.org

2, 3, 13, 7, 19, 31, 41, 31, 13, 19, 43, 31, 23, 83, 139, 31, 61, 67, 113, 79, 251, 43, 19, 31, 199, 23, 13, 167, 53, 139, 83, 127, 157, 67, 293, 431, 443, 151, 103, 79, 61, 251, 113, 47, 337, 19, 179, 31, 41, 199, 67, 23, 19, 499, 181, 367, 607, 139, 257, 359
Offset: 1

Views

Author

Paolo P. Lava, Apr 05 2019

Keywords

Comments

If n = 1, all the solutions of x | 1 + Sum_{k=1..x-1} k^(x-1) should be prime numbers, according to Giuga's conjecture.
If n*x | 1 + Sum_{k=1..x-1} k^(x-1), then certainly x does, so Giuga's conjecture would say x must be prime. Similarly if x^n divides it, so does x, so again Giuga would say x is prime. - Robert Israel, Apr 26 2019
E.g., the first solution for x^2 | 1 + Sum_{k=1..x-1} k^(x-1) is x = 1277, that is prime.

Examples

			a(4) = 7 because (1 + 1^6 + 2^6 + 3^6 + 4^6 + 5^6 + 6^6) / (4*7) = 67172 / 28 = 2399 and it is the least prime to have this property.
		

Crossrefs

Cf. A191677. All the solutions for n = m: A000040 (m=1), A002145 (m=2), A007522 (m=4), A127576 (m=8), A141887 (m=10), A127578 (m=16), A142198 (m=20), A127579 (m=32), A095995 (m=50).

Programs

  • Maple
    P:=proc(j) local k,n; for n from 2 to 10^6 do
    if frac((add(k^(n-1),k=1..n-1)+1)/(j*n))=0
    then RETURN(n); break; fi; od; end: seq(P(i),i=1..60);
  • Mathematica
    a[n_] := For[x = 2, True, x++, If[Divisible[1+Sum[k^(x-1), {k, x-1}], n x], Return[x]]];
    Array[a, 60] (* Jean-François Alcover, Oct 16 2020 *)
  • PARI
    a(n) = my(x=2); while (((1 + sum(k=1, x-1, k^(x-1))) % (n*x)), x++); x; \\ Michel Marcus, Apr 27 2019

Formula

Least solution of n*x | 1 + Sum_{k=1..x-1} k^(x-1), for n = 1, 2, 3, ...

A339582 Primes p = 8*r-1 such that all the prime factors of r are 7 mod 12.

Original entry on oeis.org

7, 151, 631, 823, 1063, 1303, 1783, 2647, 2887, 3511, 4423, 4567, 4951, 5527, 6007, 6871, 7351, 7687, 7927, 8311, 9127, 10663, 11383, 11863, 12007, 12343, 12487, 13591, 14071, 15031, 15607, 15991, 16087, 17047, 17191, 17431, 17623, 17911, 19207, 20023, 20407
Offset: 1

Views

Author

N. J. A. Sloane, Dec 24 2020

Keywords

Comments

Hugh Williams asks if this sequence is infinite.

Crossrefs

Subsequence of A007522.

Programs

  • Maple
    filter:= n ->
      isprime(n) and numtheory:-factorset((n+1)/8) mod 12 subset {7}:
    select(filter, [seq(i,i=7..10^5,8)]); # Robert Israel, Dec 24 2020
  • PARI
    isok(p) = if (isprime(p) && (Mod(p, 8)== -1), my(r=(p+1)/8, f=factor(r)[,1]); #select(x->(Mod(x, 12) == 7), f) == #f); \\ Michel Marcus, Dec 24 2020

Extensions

More terms from Michel Marcus, Dec 24 2020, who also added the initial term 7.

A385449 Irregular triangle, read by rows: row n gives the pair of proper positive fundamental solutions (x, y) of the form x^2 - 2*y^2 representing -A057126(n).

Original entry on oeis.org

1, 1, 4, 3, 1, 2, 5, 4, 2, 3, 6, 5, 1, 3, 9, 7, 3, 4, 7, 6, 1, 4, 13, 10, 4, 5, 8, 7, 3, 5, 11, 9, 2, 5, 14, 11, 5, 6, 9, 8, 1, 5, 17, 13, 6, 7, 10, 9, 1, 6, 21, 16, 5, 7, 13, 11, 7, 8, 11, 10, 4, 7, 16, 13, 3, 7, 19, 15, 2, 7, 22, 17, 1, 7, 25, 19, 8, 9, 12, 11, 5, 8, 17, 14, 7, 9, 15, 13, 3, 8, 23, 18, 9, 10, 13, 12
Offset: 1

Views

Author

Wolfdieter Lang, Jul 11 2025

Keywords

Comments

The number of (x, y) pairs in row n is 1 for n = 1 and 2, and 2^P, with P = P1 + P7, where P1 and P7 are the number of prime factors 1 modulo 8 and 7 modulo 8, respectively, of A057126(n), for n >= 3.
See A057126 for comments concerning its representation by x^2 - 2*y^2.
The numbers A057126 are given by 2^e_2 * Product_{i=1..P1} p_{1,i}^e_{1,i} * Product_{j=1..P7} p_{7,j}^e_{7,j}, with the odd primes p_{1,i} and p_{7,j} congruent to 1 and 7 modulo 8, respectively. See A007519 and A007522 for these odd primes. Together with 2 these primes are given in A038873, and without 2 in A001132. The exponents are e_2 = 0 or 1, and e_{1,i} and e_{7,j} are nonnegative. The a(1) = 1 is obtained if all exponents vanish. For the proof see Lemma 18 of the linked W. Lang paper, pp. 22 - 23.
The general solutions are obtained from each fundamental solution by application of integer powers of the matrix Auto' = Mat([3,4], [2,3]). See the linked paper eq (28), p. 14, and eq. (40), p. 17 for D = 2, and k = A057126(n). For the explicit form of the powers of Auto' in terms of Chebyshev polynomials S(n, 6) = A001109(n+1) see there eq. (38), and Lemma 10, eq. (43), p. 17.
The conversion to the pair of proper solutions (X, Y) of X^2 - 2*Y^2 = A057126(n) is given by (X, Y) = (2*y - x, x - y). This may result in solutions with negative Y values. They are then transformed to the fundamental positive proper solutions via the mentioned matrix Auto'. See the right part of the example below. For this conversion see also the Nov 09 2009 comment in A035251 by Franklin T. Adams-Watters.

Examples

			n, A057126(n) /k  1  2   3  4 ...   2^P | (X, Y) = (2*y - x, x - y)
-------------------------------------------------------------------
1,  1           | 1  1               1  |  1   0 (3   2)
2,  2           | 4  3               1  |  2   1
3,  7           | 1  2,  5  4        2  |  3  -1 (5   3),  3  1
4, 14 = 2*7     | 2  3,  6  5        2  |  4  -1 (8   5),  4  1
5, 17           | 1  3,  9  7        2  |  5  -2 (7   4),  5  2
6, 23           | 3  4,  7  6        2  |  5  -1 (11  7),  5, 1
7, 31           | 1  4, 13 10        2  |  7  -3 (9   5),  7  3
8, 34 = 2*17    | 4  5,  8  7        2  |  6  -1 (14  9),  6  1
9, 41           | 3  5, 11  9        2  |  7  -2 (13  8),  7  2
10, 46 = 2*23   | 2  5, 14 11        2  |  8  -3 (12  7),  8  3
11, 47          | 5  6,  9  8        2  |  7  -1 (17 11),  7  1
12, 49 = 7^2    | 1  5, 17 13        2  |  9  -4 (11  6),  9  4
13, 62 = 2*31   | 6  7, 10  9        2  |  8  -1 (20 13),  8  1
14, 71          | 1  6, 21 16        2  | 11  -5 (13  7), 11  5
15, 73          | 5  7, 13 11        2  |  9  -2 (19 12),  9  2
16, 79          | 7  8, 11 10        2  |  9  -1 (23 15),  9  1
17, 82 = 2*41   | 4  7, 16 13        2  | 10  -3 (18 11), 10  3
18, 89          | 3  7, 19 15        2  | 11  -4 (17 10), 11  4
19, 94 = 2*47   | 2  7, 22 17        2  | 12  -5 (16  9), 12  5
20, 97          | 1  7, 25 19        2  | 13  -6 (15  8), 13  6
21, 98 = 2*7^2  | 8  9, 12 11        2  | 10  -1 (26 17), 10  1
...
The corresponding fundamental positive proper solutions of X^2 - 2*Y^2 = +119 are: [13 -5 (19 11), 13, 5] and [11 -1 (29 19), 11 1].
		

Crossrefs

A060108 Sequence of sums based on primes = 7 mod 8.

Original entry on oeis.org

2, 22, 40, 92, 210, 260, 442, 672, 950, 1162, 1520, 1650, 2072, 2380, 2882, 3060, 4030, 5370, 5612, 6112, 7740, 8030, 8932, 9560, 9882, 10542, 14950, 15352, 16590, 17442, 21540, 22022, 23002, 23500, 28222, 29330, 31032, 32782, 34580, 35190
Offset: 1

Views

Author

Marc LeBrun, Feb 27 2001

Keywords

Examples

			For n=2, p=A007522(2)=23, so a(2)=0+0+0+1+1+2+2+3+4+4+5=22.
		

Crossrefs

Cf. A007522.

Programs

  • PARI
    lista(nn) = {forprime(p=2, nn, if ((p % 8) == 7, print1((p^2-1)/24, ", ")););} \\ Michel Marcus, Dec 12 2017

Formula

a(n) = Sum_{k=1..(p-1)/2} floor(k^2/p+1/2) where p is n-th prime congruent to 7 mod 8 (i.e. A007522(n)).
a(n) = (A007522(n)^2 - 1)/24. See 2nd link. - Michel Marcus, Dec 12 2017

A100876 Least number of squares that sum to prime(n).

Original entry on oeis.org

2, 3, 2, 4, 3, 2, 2, 3, 4, 2, 4, 2, 2, 3, 4, 2, 3, 2, 3, 4, 2, 4, 3, 2, 2, 2, 4, 3, 2, 2, 4, 3, 2, 3, 2, 4, 2, 3, 4, 2, 3, 2, 4, 2, 2, 4, 3, 4, 3, 2, 2, 4, 2, 3, 2, 4, 2, 4, 2, 2, 3, 2, 3, 4, 2, 2, 3, 2, 3, 2, 2, 4, 4, 2, 3, 4, 2, 2, 2, 2, 3, 2, 4, 2, 4, 3, 2, 2, 2, 4, 3, 4, 4, 3, 3, 4, 2, 2, 3, 2, 3, 2, 3, 2, 3
Offset: 1

Views

Author

Giovanni Teofilatto, Jan 09 2005

Keywords

Comments

Note that a(n) <= 4 by Lagrange's four-square theorem. - T. D. Noe, Jan 10 2005
Primes 2 and 4k+1 (A002313) require only 2 positive squares; primes 8k+3 (A007520) require 3 positive squares; primes 8k+7 (A007522) require 4 positive squares.

Examples

			a(2)=3 because 3=1^2+1^2+1^2;
a(3)=2 because 5=1^2+2^2;
a(4)=4 because 7=2^2+1^2+1^2+1^2.
		

Crossrefs

Cf. A002828 (least number of squares needed to represent n).

Programs

  • Mathematica
    SquareCnt[n_] := If[SquaresR[1, n] > 0, 1, If[SquaresR[2, n] > 0, 2, If[SquaresR[3, n] > 0, 3, 4]]]; Table[p = Prime[n]; SquareCnt[p], {n, 150}] (* T. D. Noe, Jan 10 2005, revised Sep 27 2011 *)

Formula

a(n) = A002828(prime(n)) - T. D. Noe, Jan 10 2005

Extensions

More terms from T. D. Noe, Jan 10 2005

A121051 Semiprimes which are sums of 4 but no fewer nonzero squares.

Original entry on oeis.org

15, 39, 55, 87, 95, 111, 119, 143, 159, 183, 215, 247, 287, 295, 303, 319, 327, 335, 391, 407, 415, 447, 471, 511, 519, 527, 535, 543, 551, 559, 583, 591, 623, 655, 671, 679, 687, 695, 703, 767, 791, 799, 807, 815, 831, 871, 879, 895, 943, 951, 959, 1007
Offset: 1

Views

Author

Jonathan Vos Post, Aug 08 2006

Keywords

Comments

Semiprime analog of A007522 Primes of form 8n+7. These semiprimes must all be numbers of the form 4^i(8j+7), i >= 0, j >= 0. However, for positive i, 4^i(8j+7) has more than 2 prime factors (with multiplicity). Hence from Legendre's corollary to Lagrange's Four-Square Theorem, this sequence is precisely Semiprimes of the form 8*k+7.

Crossrefs

Programs

  • Mathematica
    Select[8*Range[200]+7,PrimeOmega[#]==2&] (* Harvey P. Dale, Oct 28 2017 *)

Extensions

a(15)-a(52) from Giovanni Resta, Jun 13 2016

A124985 Primes of the form 8*k + 7 generated recursively. Initial prime is 7. General term is a(n) = Min_{p is prime; p divides 8*Q^2 - 1; p == 7 (mod 8)}, where Q is the product of the previous terms.

Original entry on oeis.org

7, 23, 207367, 1902391, 167, 1511, 28031, 79, 3142977463, 2473230126937097422987916357409859838765327, 2499581669222318172005765848188928913768594409919797075052820591, 223
Offset: 1

Views

Author

Nick Hobson, Nov 18 2006

Keywords

Comments

8*Q^2 - 1 always has a prime divisor congruent to 7 modulo 8.

Examples

			a(4) = 1902391 is the smallest prime divisor, congruent to 7 modulo 8, of 8*Q^2 - 1 = 8917046441372551 = 97 * 1902391 * 48322513, where Q = 7 * 23 * 207367.
		

References

  • D. M. Burton, Elementary Number Theory, McGraw-Hill, Sixth Edition (2007), p. 182.

Crossrefs

Programs

  • Mathematica
    a={7}; q=1;
    For[n=2,n<=9,n++,
        q=q*Last[a];
        AppendTo[a,Min[Select[FactorInteger[8*q^2-1][[All,1]],Mod[#,8]==7&]]];
        ];
    a (* Robert Price, Jul 18 2015 *)
  • PARI
    main(size)={my(v=vector(size),i,q=1,t);for(i=1,size,t=1;while(!(prime(t)%8==7&&(8*q^2-1)%prime(t)==0),t++);v[i]=prime(t);q*=v[i]);v;} /* Anders Hellström, Jul 18 2015 */

Extensions

Edited and added a(11)-a(12) by Max Alekseyev, May 31 2013
Previous Showing 71-80 of 83 results. Next