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

A006254 Numbers k such that 2k-1 is prime.

Original entry on oeis.org

2, 3, 4, 6, 7, 9, 10, 12, 15, 16, 19, 21, 22, 24, 27, 30, 31, 34, 36, 37, 40, 42, 45, 49, 51, 52, 54, 55, 57, 64, 66, 69, 70, 75, 76, 79, 82, 84, 87, 90, 91, 96, 97, 99, 100, 106, 112, 114, 115, 117, 120, 121, 126, 129, 132, 135, 136, 139, 141, 142, 147, 154, 156, 157
Offset: 1

Views

Author

Keywords

Comments

a(n) is the inverse of 2 modulo prime(n) for n >= 2. - Jean-François Alcover, May 02 2017
The following sequences (allowing offset of first term) all appear to have the same parity: A034953, triangular numbers with prime indices; A054269, length of period of continued fraction for sqrt(p), p prime; A082749, difference between the sum of next prime(n) natural numbers and the sum of next n primes; A006254, numbers n such that 2n-1 is prime; A067076, 2n+3 is a prime. - Jeremy Gardiner, Sep 10 2004
Positions of prime numbers among odd numbers. - Zak Seidov, Mar 26 2013
Also, the integers remaining after removing every third integer following 2, and, recursively, removing every p-th integer following the next remaining entry (where p runs through the primes, beginning with 5). - Pete Klimek, Feb 10 2014
Also, numbers k such that k^2 = m^2 + p, for some integers m and every prime p > 2. Applicable m values are m = k - 1 (giving p = 2k - 1). Less obvious is: no solution exists if m equals any value in A047845, which is the complement of (A006254 - 1). - Richard R. Forberg, Apr 26 2014
If you define a different type of multiplication (*) where x (*) y = x * y + (x - 1) * (y - 1), (which has the commutative property) then this is the set of primes that follows. - Jason Atwood, Jun 16 2019

Crossrefs

Equals A005097 + 1. A130291 is an essentially identical sequence.
Cf. A065091.
Numbers n such that 2n+k is prime: A005097 (k=1), A067076 (k=3), A089038 (k=5), A105760 (k=7), A155722 (k=9), A101448 (k=11), A153081 (k=13), A089559 (k=15), A173059 (k=17), A153143 (k=19).
Numbers n such that 2n-k is prime: this seq(k=1), A098090 (k=3), A089253 (k=5), A089192 (k=7), A097069 (k=9), A097338 (k=11), A097363 (k=13), A097480 (k=15), A098605 (k=17), A097932 (k=19).

Programs

Formula

a(n) = (A000040(n+1) + 1)/2 = A067076(n-1) + 2 = A086801(n-1)/2 + 2.
a(n) = (1 + A065091(n))/2. - Omar E. Pol, Nov 10 2007
a(n) = sqrt((A065091^2 + 2*A065091+1)/4). - Eric Desbiaux, Jun 29 2009
a(n) = A111333(n+1). - Jonathan Sondow, Jan 20 2016

Extensions

More terms from Erich Friedman
More terms from Omar E. Pol, Nov 10 2007

A130290 Number of nonzero quadratic residues modulo the n-th prime.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 8, 9, 11, 14, 15, 18, 20, 21, 23, 26, 29, 30, 33, 35, 36, 39, 41, 44, 48, 50, 51, 53, 54, 56, 63, 65, 68, 69, 74, 75, 78, 81, 83, 86, 89, 90, 95, 96, 98, 99, 105, 111, 113, 114, 116, 119, 120, 125, 128, 131, 134, 135, 138, 140, 141, 146, 153, 155, 156, 158
Offset: 1

Views

Author

M. F. Hasler, May 21 2007

Keywords

Comments

Row lengths for formatting A063987 as a table: The number of nonzero quadratic residues modulo a prime p equals floor(p/2), or (p-1)/2 if p is odd. The number of squares including 0 is (p+1)/2, if p is odd (rows prime(i) of A096008 formatted as a table). In fields of characteristic 2, all elements are squares. For any m > 0, floor(m/2) is the number of even positive integers less than or equal to m, so a(n) also equals the number of even positive integers less than or equal to the n-th prime. For all n > 0, A130290(n+1) = A005097(n) = A102781(n+1) = A102781(n+1) = A130291(n+1)-1 = A111333(n+1)-1 = A006254(n)-1.
From Vladimir Shevelev, Jun 18 2016: (Start)
a(1)+2 and, for n >= 2, a(n)+1 is the smallest k such that there exists 0 < k_1 < k with the condition k_1^2 == k^2 (mod prime(n)).
Indeed, for n >= 2, if prime(n) = 4*t+1 then k = 2*t+1 = a(n)+1, since (2*t+1)^2 == (2*t)^2 (mod prime(n)) and there cannot be a smaller value of k; if prime(n) = 4*t-1, then k = 2*t = a(n)+1, since (2*t)^2 == (2*t-1)^2 (mod prime(n)). (End)
a(n) is the number of pairs (a,b) such that a + b = prime(n) with 1 <= a <= b. - Nicholas Leonard, Oct 02 2022

Examples

			a(1)=1 since the only nonzero element of Z/2Z equals its square.
a(3)=2 since 1=1^2=(-1)^2 and 4=2^2=(-2)^2 are the only nonzero squares in Z/5Z.
a(1000000) = 7742931 = (prime(1000000)-1)/2.
		

Crossrefs

Essentially the same as A005097.
Cf. A102781 (Number of even numbers less than the n-th prime), A063987 (quadratic residues modulo the n-th prime), A006254 (Numbers n such that 2n-1 is prime), A111333 (Number of odd numbers <= n-th prime), A000040 (prime numbers), A130291.
Appears in A217983. - Johannes W. Meijer, Oct 25 2012

Programs

Formula

a(n) = floor( A000040(n)/2 ) = #{ even positive integers <= A000040(n) }
a(n) = A055034(A000040(n)), n>=1. - Wolfdieter Lang, Sep 20 2012
a(n) = A005097(n-[n>1]) = A005097(max(n-1,1)). - M. F. Hasler, Dec 13 2019

A161148 Number of partitions of n such that each term of the partition is a squared divisor of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 3, 1, 5, 1, 4, 2, 6, 1, 9, 1, 8, 3, 6, 1, 16, 2, 7, 4, 12, 1, 21, 1, 15, 4, 9, 2, 39, 1, 10, 5, 25, 1, 35, 1, 24, 9, 12, 1, 76, 2, 21, 6, 32, 1, 61, 3, 38, 7, 15, 1, 174, 1, 16, 10, 46, 3, 93, 1, 50, 8, 42, 1, 231, 1, 19, 19, 60, 2, 135, 1
Offset: 1

Views

Author

R. J. Mathar, Jun 03 2009

Keywords

Examples

			a(n=12)=5 counts these 5 partitions of 12: 1^2+1^2+..+1^2 = 1^2+1^2+...+1^2+2^2 = 1^2+1^2+..+1^2+2^2+2^2 = 1^2+1^2+1^2+3^2=2^2+2^2+2^2. Partitions with the divisors 4, 6 or 12 do not contribute to the count because 4^2, 6^2 and 12^2 are larger than n.
		

Crossrefs

Programs

  • Maple
    a := proc(n) coeftayl(1/mul(1-x^(d^2),d=numtheory[divisors](n)),x=0,n) ; end:
  • Mathematica
    a[n_] := SeriesCoefficient[1/Product[1-x^(d^2), {d, Divisors[n]}], {x, 0, n}];
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Apr 04 2024, after Maple code *)

Formula

a(p) = 1 if p a prime (A000040).
a(2p) = A130291(n) if p=A000040(n).
a(n) = [x^n] Product_{d|n} 1/( 1-x^(d^2) ).

A323703 Number of values of (X^3 + X) mod prime(n).

Original entry on oeis.org

1, 3, 3, 5, 7, 9, 11, 13, 15, 19, 21, 25, 27, 29, 31, 35, 39, 41, 45, 47, 49, 53, 55, 59, 65, 67, 69, 71, 73, 75, 85, 87, 91, 93, 99, 101, 105, 109, 111, 115, 119, 121, 127, 129, 131, 133, 141, 149, 151, 153, 155, 159, 161, 167, 171, 175, 179, 181, 185, 187, 189, 195
Offset: 1

Views

Author

Florian Severin, Jan 24 2019

Keywords

Comments

a(n) is also the number of values of any other polynomial of degree 3, except X^3.
a(n) appears to approach (2/3)*prime(n) as n increases.

Examples

			a(1) = 1 since the only value X^3 + X takes mod 2 is 0.
		

References

  • R. Daublebsky von Sterneck, Über die Anzahl inkongruenter Werte, die eine ganze Funktion dritten Grades annimmt, Sitzungsber. Akad. Wiss. Wien (2A) 114 (1908), 711-717.

Crossrefs

Cf. A323704 (the number of values of X^3), A130291 (the number of values of X^2, which is also the number of values of any other polynomial of degree 2).

Programs

  • Mathematica
    Array[Length@ Union@ Mod[Array[#^3 + # &, #], #] &@ Prime@ # &, 62] (* Michael De Vlieger, Jan 27 2019 *)
  • PARI
    a(n) = #Set(vector(prime(n), k, Mod(k^3+k, prime(n)))); \\ Michel Marcus, Jan 25 2019

Formula

a(n) = prime(n) - 2*floor(prime(n)/6 + 1/2), for n >= 3. - Ridouane Oudra, Jun 13 2020
for n>=3, a(n) = (2*p + (p/3))/3 with p=prime(n) and where (p/3) is the Legendre symbol. See von Sterneck, Sun, and Brazelton et al. articles. - Michel Marcus, Mar 17 2021
Showing 1-4 of 4 results.