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-10 of 20 results. Next

A005097 (Odd primes - 1)/2.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Comments

Or, numbers k such that 2k+1 is prime.
Also numbers not of the form 2xy + x + y. - Jose Brox (tautocrona(AT)terra.es), Dec 29 2005
This sequence arises if you factor the product of a large number of the first odd numbers into the form 3^n(3)5^n(5)7^n(7)11^n(11)... Then n(3)/n(5) = 2, n(3)/n(7) = 3, n(3)/n(11) = 5, ... . - Andrzej Staruszkiewicz (astar(AT)th.if.uj.edu.pl), May 31 2007
Kohen shows: A king invites n couples to sit around a round table with 2n+1 seats. For each couple, the king decides a prescribed distance d between 1 and n which the two spouses have to be seated from each other (distance d means that they are separated by exactly d-1 chairs). We will show that there is a solution for every choice of the distances if and only if 2n+1 is a prime number [i.e., iff n is in A005097], using a theorem known as Combinatorial Nullstellensatz. - Jonathan Vos Post, Jun 14 2010
Starting from 6, positions at which new primes are seen for Goldbach partitions. E.g., 31 is first seen at 34 from 31+3, so position = 1 + (34-6)/2 = 15. - Bill McEachen, Jul 05 2010
Perfect error-correcting Lee codes of word length n over Z: it is conjectured that these always exist when 2n+1 is a prime, as mentioned in Horak. - Jonathan Vos Post, Sep 19 2011
Also solutions to: A000010(2*n+1) = n * A000005(2*n+1). - Enrique Pérez Herrero, Jun 07 2012
A193773(a(n)) = 1. - Reinhard Zumkeller, Jan 02 2013
I conjecture that the set of pairwise sums of terms of this sequence (A005097) is the set of integers greater than 1, i.e.: 1+1=2, 1+2=3, ..., 5+5=10, ... (This is equivalent to Goldbach's conjecture: every even integer greater than or equal to 6 can be expressed as the sum of two odd primes.) - Lear Young, May 20 2014
See conjecture and comments from Richard R. Forberg, in Links section below, on the relationship of this sequence to rules on values of c that allow both p^q+c and p^q-c to be prime, for an infinite number of primes p. - Richard R. Forberg, Jul 13 2016
The sequence represents the minimum number Ng of gears which are needed to draw a complete graph of order p using a Spirograph(R), where p is an odd prime. The resulting graph consists of Ng hypotrochoids whose respective nodes coincide. If the teethed ring has a circumference p then Ng = (p-1)/2. Examples: A complete graph of order three can be drawn with a Spirograph(R) using a ring with 3n teeth and one gear with n teeth. n is an arbitrary number, only related to the geometry of the gears. A complete graph of order 5 can be drawn using a ring with diameter 5 and 2 gears with diameters 1 and 2 respectively. A complete graph of order 7 can be drawn using a ring with diameter 7 and 3 gears with diameters 1, 2 and 3 respectively. - Bob Andriesse, Mar 31 2017

Crossrefs

Complement of A047845. Cf. A000040, A006005, A006093.
A130290 is an essentially identical sequence.
Cf. A005384 (subsequence of primes), A266400 (their indices in this sequence).
Numbers n such that 2n+k is prime: this seq(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: A006254 (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).
Cf. also A266409, A294507.

Programs

Formula

a(n) = A006093(n)/2 = A000010(A000040(n+1))/2.
a(n) = (prime(n+1)^2-1)/(2*sigma(prime(n+1))) = (A000040(n+1)^2-1)/(2*A000203(A000040(n+1))). - Gary Detlefs, May 02 2012
a(n) = (A065091(n) - 1) / 2. - Reinhard Zumkeller, Jan 02 2013
a(n) ~ n*log(n)/2. - Ilya Gutkovskiy, Jul 11 2016
a(n) = A294507(n) (mod prime(n+1)). - Jonathan Sondow, Nov 04 2017
a(n) = A130290(n+1). - Chai Wah Wu, Jun 04 2022

A249938 E.g.f.: Sum_{n>=0} exp(n^2*x) / 2^(n+1).

Original entry on oeis.org

1, 3, 75, 4683, 545835, 102247563, 28091567595, 10641342970443, 5315654681981355, 3385534663256845323, 2677687796244384203115, 2574844419803190384544203, 2958279121074145472650648875, 4002225759844168492486127539083, 6297562064950066033518373935334635, 11403568794011880483742464196184901963
Offset: 0

Views

Author

Paul D. Hanna, Nov 20 2014

Keywords

Comments

a(n) == 3 (mod 72) for n>0.
Conjectures from Federico Provvedi, Nov 07 2020: (Start)
For n>1, a(n+1) - a(n) == 0 (mod m) if and only if m divides 288.
This sequence is a periodic sequence modulo m, and if m is the k-th prime, the periods of {a(n)} over k-th prime is the sequence of the number of nonzero quadratic residues modulo k-th prime, for all k>0.
Example: k=9, m = prime(9) = 23, for n>0, {a(n) mod 23} generates a period of 11 elements {3, 6, 14, 22, 5, 3, 10, 2, 4, 5, 0}, hence A130290(9) = 11
(End)

Examples

			E.g.f.: A(x) = 1 + 3*x + 75*x^2/2! + 4683*x^3/3! + 545835*x^4/4! +...
where the e.g.f. equals the infinite series:
A(x) = 1/2 + exp(x)/2^2 + exp(4*x)/2^3 + exp(9*x)/2^4 + exp(16*x)/2^5 + exp(25*x)/2^6 + exp(36*x)/2^7 + exp(49*x)/2^8 +...
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[k! * StirlingS2[2*n, k],{k,0,2*n}],{n,0,20}] (* Vaclav Kotesovec, May 04 2015 *)
    Fubini[n_, r_] := Sum[k!*Sum[(-1)^(i+k+r)*(i+r)^(n-r)/(i!*(k-i-r)!), {i, 0, k-r}], {k, r, n}]; a[n_] := Fubini[2n, 1]; a[0] = 1; Table[a[n], {n, 0, 14}] (* Jean-François Alcover, Mar 30 2016 *)
    Table[-PolyLog[-2*n, 2] / 2, {n, 0, 48}] (* Federico Provvedi, Nov 07 2020 *)
    HurwitzLerchPhi[1/2, -2*Range[0,48], 0] / 2 (* Federico Provvedi, Nov 11 2020 *)
    -HurwitzLerchPhi[2, -2*Range[0, 48], 1] (*Federico Provvedi,Nov 11 2020*)
  • PARI
    /* E.g.f.: Sum_{n>=0} exp(n^2*x)/2^(n+1) */
    \p100 \\ set precision
    {a(n) = round( n!*polcoeff(sum(m=0, 600, exp(m^2*x +x*O(x^n))/2^(m+1)*1.), n) )}
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    /* E.g.f.: (2 - cosh(x)) / (5 - 4*cosh(x)): */
    {a(n) = local(X=x+O(x^(2*n+1))); (2*n)!*polcoeff( (2 - cosh(X)) / (5 - 4*cosh(X)) , 2*n)}
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    /* Formula for a(n): */
    {Stirling2(n, k)=n!*polcoeff(((exp(x+x*O(x^n))-1)^k)/k!, n)}
    {a(n) = sum(k=0, 2*n, k! * Stirling2(2*n, k) )}
    for(n=0, 20, print1(a(n), ", "))

Formula

E.g.f.: (2 - cosh(x)) / (5 - 4*cosh(x)) = Sum_{n>=0} a(n)*x^(2*n)/(2*n)!.
a(n) = Sum_{k=0..2*n} k! * Stirling2(2*n, k) for n>=0.
a(n) = A000670(2*n), where A000670 is the Fubini numbers.
a(n) ~ (2*n)! / (2 * (log(2))^(2*n+1)). - Vaclav Kotesovec, May 04 2015
a(n) = Sum_{p=1..k, q=1..k} Stirling2(k,p)*Stirling2(k,q)*p!*q!*A008288(p, q) for n>1, where A008288 are the Delannoy numbers. See Chen link. - Michel Marcus, Apr 20 2017
a(n) = Sum_{k>=0} k^(2*n) / 2^(k + 1). - Ilya Gutkovskiy, Dec 19 2019
a(n) = -Polylog(-2*n, 2) / 2. - Federico Provvedi, Nov 07 2020
a(n) = Phi(1/2, -2*n, 0), where Phi(z,s,a) is the Hurwitz-Lerch Zeta transcendental function. - Federico Provvedi, Nov 11 2020

A160479 The ZL(n) sequence of the Zeta and Lambda triangles A160474 and A160487.

Original entry on oeis.org

10, 21, 2, 11, 13, 1, 34, 57, 5, 23, 1, 1, 29, 31, 2, 1, 37, 1, 41, 301, 1, 47, 1, 1, 53, 3, 1, 59, 61, 1, 2, 67, 1, 71, 73, 1, 1, 79, 1, 83, 1, 1, 89, 1, 1, 1, 97, 1, 505, 103, 1, 107, 109, 11, 113, 1, 1, 1, 1, 1, 1, 127, 2, 131
Offset: 3

Views

Author

Johannes W. Meijer, May 24 2009

Keywords

Comments

The rather strange ZL(n) sequence rules both the Zeta and Lambda triangles.
The Zeta triangle led to the first and the Lambda triangle to the second Maple algorithm.
The first ZL(n) formula is a conjecture. This formula links the ZL(n) to the prime numbers A000040; see A217983, A128060, A130290 and the third Maple program.

Crossrefs

Cf. A160474 and A160487.
The cnf1(n, k) are the central factorial numbers A008955.
The cnf2(n, k) are the central factorial numbers A008956.

Programs

  • Maple
    nmax := 65; for n from 0 to nmax do cfn1(n, 0):=1: cfn1(n, n):=(n!)^2 end do: for n from 1 to nmax do for k from 1 to n-1 do cfn1(n, k) := cfn1(n-1, k-1)*n^2 + cfn1(n-1, k) end do: end do: Omega(0) := 1: for n from 1 to nmax do Omega(n) := (sum((-1)^(k1+n+1)*(bernoulli(2*k1)/(2*k1))*cfn1(n-1, n-k1), k1=1..n))/(2*n-1)! end do: for n from 1 to nmax do d(n) := 2^(2*n-1)*Omega(n) end do: for n from 1 to nmax do b(n) := 4^(-n)*(2*n+1)*n*denom(Omega(n)) end do: c(1) := b(1): for n from 1 to nmax-1 do c(n+1) := lcm(c(n)*(n+1)*(2*n+3)/2, b(n+1)) end do: for n from 1 to nmax do cm(n) := c(n)*(1/6)* 4^n/(2*n+1)! end do: for n from 3 to nmax+1 do ZL(n):=cm(n-1)/cm(n-2) end do: seq(ZL(n), n=3..nmax+1);
    # End program 1 (program edited by Johannes W. Meijer, Oct 25 2012)
    nmax1 := nmax; for n from 0 to nmax1 do cfn2(n, 0) :=1: cfn2(n, n) := (doublefactorial(2*n-1))^2 od: for n from 1 to nmax1 do for k from 1 to n-1 do cfn2(n, k) := (2*n-1)^2*cfn2(n-1, k-1) + cfn2(n-1, k) od: od: for n from 1 to nmax1 do Delta(n-1) := sum((1-2^(2*k1-1))* (-1)^(n+1)*(-bernoulli(2*k1)/(2*k1))*(-1)^(k1+n)*cfn2(n-1,n-k1), k1=1..n) /(2*4^(n-1)*(2*n-1)!) end do: for n from 1 to nmax1 do b(n) := (2*n)*(2*n-1)*denom(Delta(n-1))/ (2^(2*n)*(2*n-1)) end do: c(1) := b(1): for n from 1 to nmax1-1 do c(n+1) := lcm(c(n)*(2*n+2)* (2*n+1), b(n+1)) end do: for n from 1 to nmax1 do cm(n) := c(n)/(6*(2*n)!) end do: for n from 3 to nmax1+1 do ZL(n) := cm(n-1)/cm(n-2) end do: seq(ZL(n), n=3..nmax1+1);
    # End program 2 (program edited by Johannes W. Meijer, Sep 20 2012)
    nmax2 := nmax: A000040 := proc(n): ithprime(n) end: A130290 := proc(n): if n =1 then 1 else (A000040(n)-1)/2 fi: end: A128060 := proc(n) local n1: n1:=2*n-1: if type(n1, prime) then A128060(n) := 1 else A128060(n) := n1 fi: end: for n from 1 to nmax2 do A217983(n) := 1 od: for n from 1 to nmax2 do for n1 from 1 to floor(log[A000040(n)](nmax2)) do A217983(A130290(n) * A000040(n)^n1) := A000040(n) od: od: ZL := proc(n): (2*n-1)*(A217983(n-1)/A128060(n)) end: seq(ZL(n), n=3..nmax2+1);
    # End program 3 (program added by Johannes W. Meijer, Oct 25 2012)

Formula

ZL(n) = (2*n-1) * (A217983(n-1)/A128060(n)) for n >= 3.
ZL(n) = ZETA(n, m)/(ZETA(n-1, m-1) - (n-1)^2 * ZETA(n-1, m)), see A160474.
ZL(n) = LAMBDA(n, m)/(LAMBDA(n-1, m-1) - (2*n-3)^2 * LAMBDA(n-1, m)), see A160487.
ZL(n) = A160476(n)/A160476(n-1).

Extensions

Comments, formulas and third Maple program added by Johannes W. Meijer, Oct 25 2012

A217983 If n = floor(p/2) * p^e, for some (by necessity unique) prime p and exponent e > 0, then a(n) = p, otherwise a(n) = 1.

Original entry on oeis.org

1, 2, 3, 2, 1, 1, 1, 2, 3, 5, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Johannes W. Meijer, Oct 25 2012

Keywords

Comments

a(A130290(n) * A000040(n)^n1) = A000040(n), n >= 1 and n1 >= 1, and a(n) = 1 elsewhere. - The original name of the sequence.
The a(n) are related to the prime numbers A000040 and the number of nonzero quadratic residues modulo the n-th prime A130290, see the first formula and the Maple program.
This sequence resembles the exponential of the von Mangoldt function A014963; for the latter sequence a(A000040(n)^n1) = A000040(n), n >= 1 and n1 >= 1, and a(n) = 1 elsewhere.
Positions of the first occurrence of each successive noncomposite number (and also the records) is given by the union of {2} and A008837. - Antti Karttunen, Jan 17 2025

Crossrefs

Cf. A000079, A000244 (after their initial 1's, the positions of 2's and 3's respectively), A020699 (positions of 5's from its third term 10 onward), A169634 (positions of 7's from the second term onward), A379956 (positions of terms > 1).

Programs

  • Maple
    nmax := 78: A000040 := proc(n): ithprime(n) end: A130290 := proc(n): if n =1 then 1 else (A000040(n)-1)/2 fi: end: for n from 1 to nmax do A217983(n) := 1 od: for n from 1 to nmax do for n1 from 1 to floor(log[A000040(n)](nmax)) do A217983(A130290(n) * A000040(n)^n1) := A000040(n) od: od: seq(A217983(n), n=1..nmax);
  • PARI
    A217983(n) = { my(f=factor(n)); for(i=1,#f~,if((n/(f[i,1]^f[i,2])) == (f[i,1]\2), return(f[i,1]))); (1); }; \\ Antti Karttunen, Jan 16 2025

Formula

a(A130290(n) * A000040(n)^n1) = A000040(n), n >= 1 and n1 >= 1, and a(n)= 1 elsewhere.
a(n) = (A160479(n+1) * A128060(n+1))/(2*n+1) for n >= 2.

Extensions

Definition simplified, original definition moved to comments; more terms added by Antti Karttunen, Jan 16 2025

A130291 Number of quadratic residues (including 0) modulo the n-th prime.

Original entry on oeis.org

2, 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

M. F. Hasler, May 21 2007

Keywords

Comments

The number of squares (quadratic residues including 0) modulo a prime p (sequence A096008 with every "1" prefixed by a "0") equals 1+floor(p/2), or ceiling(p/2) = (p+1)/2 if p is odd. (In fields of characteristic 2, all elements are squares.) See A130290(n)=A130291(n)-1 for number of nonzero residues. For all n>0, A130291(n+1) = A111333(n+1) = A006254(n) = A005097(n)-1 = A102781(n+1)-1 = A102781(n+1)-1 = A130290(n+1)-1.

Examples

			a(1)=2 since both elements of Z/2Z are squares.
a(3)=0 since 0=0^2, 1=1^2=(-1)^2 and 4=2^2=(-2)^2 are squares in Z/5Z.
a(1000000) = 7742932 = (p[1000000]+1)/2.
		

Crossrefs

Essentially the same as A006254.
Cf. A005097 (Odd primes - 1)/2, A102781 (Integer part of n#/(n-2)#/2#), 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), A130290 (number of nonzero residues modulo primes).

Programs

Formula

a(n) = floor( A000040(n)/2 )+1

A144769 a(n) = floor(prime(n)/3).

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 14, 15, 17, 19, 20, 22, 23, 24, 26, 27, 29, 32, 33, 34, 35, 36, 37, 42, 43, 45, 46, 49, 50, 52, 54, 55, 57, 59, 60, 63, 64, 65, 66, 70, 74, 75, 76, 77, 79, 80, 83, 85, 87, 89, 90, 92, 93, 94, 97, 102, 103, 104, 105, 110, 112, 115, 116
Offset: 1

Views

Author

Keywords

Crossrefs

See A130290 for prime(n)/2 or A075518 for prime(n)/4.

Programs

Formula

a(n) = floor(A000040(n)/3). - R. J. Mathar, Sep 21 2008

Extensions

Edited by R. J. Mathar, Sep 21 2008

A138239 Triangle read by rows: T(n,k) = A000040(k) if A002445(n) mod A000040(k) = 0, otherwise 1.

Original entry on oeis.org

1, 2, 3, 2, 3, 5, 2, 3, 1, 7, 2, 3, 5, 1, 1, 2, 3, 1, 1, 11, 1, 2, 3, 5, 7, 1, 13, 1, 2, 3, 1, 1, 1, 1, 1, 1, 2, 3, 5, 1, 1, 1, 17, 1, 1, 2, 3, 1, 7, 1, 1, 1, 19, 1, 1, 2, 3, 5, 1, 11, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 2, 3, 5, 7, 1, 13, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Mats Granvik, Mar 07 2008

Keywords

Comments

Row products give A002445.
A prime number appears in a column at every A130290-th row from the (A130290+1)-th row onwards. The prime numbers are, so to speak, equidistantly distributed in the columns. A130290 is essentially A005097. Counting terms > 1 in the rows gives A046886.

Examples

			First few rows of the triangle and row products are:
1 = 1
2*3 = 6
2*3*5 = 30
2*3*1*7 = 42
2*3*5*1*1 = 30
2*3*1*1*11*1 = 66
2*3*5*7*1*13*1 = 2730
		

Crossrefs

Programs

  • Maple
    T:= (n, k)-> (p-> `if`(irem(denom(bernoulli(2*n)), p)=0, p, 1))(ithprime(k)):
    seq(seq(T(n, k), k=1..n+1), n=0..20);  # Alois P. Heinz, Aug 27 2017
  • Mathematica
    t[n_, k_] := If[Mod[Denominator[BernoulliB[2n]], (p = Prime[k])] == 0, p, 1];
    Flatten[Table[t[n, k], {n, 0, 13}, {k, 1, n+1}]][[1 ;; 102]] (* Jean-François Alcover, Jun 16 2011 *)
  • PARI
    tabl(nn) = {for (n=0, nn, dbn = denominator(bernfrac(2*n)); for (k=1, n+1, if (! (dbn % prime(k)), w = prime(k), w = 1); print1(w, ", "); ); print; ); } \\ Michel Marcus, Aug 27 2017

Extensions

Definition edited by N. J. A. Sloane, Mar 18 2010
Offset corrected by Alois P. Heinz, Aug 27 2017

A379956 Numbers k that can be expressed in the form k = floor(prime(i)/2) * prime(i)^e, for some e, i > 0, where prime(i) = A000040(i).

Original entry on oeis.org

2, 3, 4, 8, 9, 10, 16, 21, 27, 32, 50, 55, 64, 78, 81, 128, 136, 147, 171, 243, 250, 253, 256, 406, 465, 512, 605, 666, 729, 820, 903, 1014, 1024, 1029, 1081, 1250, 1378, 1711, 1830, 2048, 2187, 2211, 2312, 2485, 2628, 3081, 3249, 3403, 3916, 4096, 4656, 5050, 5253, 5671, 5819, 5886, 6250, 6328, 6561, 6655, 7203, 8001
Offset: 1

Views

Author

Antti Karttunen, Jan 16 2025

Keywords

Examples

			55 = 5 * 11 is included, because floor(11/2) = 5.
666 = 2 * 3^2 * 37 is included, because floor(37/2) = 18 = 2 * 3^2.
		

Crossrefs

Cf. A000079, A000244 (subsequences after their initial 1's), A379955 (characteristic function).
Positions of terms > 1 in A217983.

Programs

  • Maple
    N:= 10000: # for terms < N
    R:= NULL:
    p:= 1:
    do
      p:= nextprime(p);
      a:= floor(p/2);
      if a*p > N then break fi;
      for e from 1 do
        x:= a*p^e;
        if x > N then break fi;
        R:= R,x;
      od
    od:
    sort([R]); # Robert Israel, Jan 16 2025
  • PARI
    is_A379956 = A379955;

A139791 Numbers n for which 2n is a multiple of A002326(n), the multiplicative order of 2 mod 2n+1.

Original entry on oeis.org

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, 165, 168, 170
Offset: 1

Views

Author

Vladimir Shevelev, May 21 2008, May 24 2008

Keywords

Comments

The sequence properly contains A005097. 170 is the first number which is not in A005097. One can prove that A002326(2^(2t-1)) = 4t. Thus if n=2^(2t-1), where, for any m>0, t=2^(m-1) then 2n is a multiple of A002326(n) while 2n+1 is a Fermat number which, as well known, is not always a prime.
The sequence is the union of A005097 and (A001567 - 1)/2. [Conjectured by Vladimir Shevelev, proved by Ray Chandler, May 26 2008]

References

  • Christopher Adler and Jean-Paul Allouche (2022), Finite self-similar sequences, permutation cycles, and music composition, Journal of Mathematics and the Arts, 16:3, 244-261, DOI: 10.1080/17513472.2022.2116745.

Crossrefs

Programs

  • Mathematica
    Select[Range[160], Divisible[2#, MultiplicativeOrder[2, 2#+1]] &] (* Amiram Eldar, Jun 28 2019 *)
  • PARI
    isok(n) = !(2*n % znorder(Mod(2, 2*n+1))); \\ Michel Marcus, Nov 02 2017

Extensions

Data extended up to a(68) = 170 to clarify distinction from A005097 and essentially identical sequences A130290 and A102781, by M. F. Hasler, Dec 13 2019

A236959 Number of nonzero cubic residues modulo the n-th prime.

Original entry on oeis.org

1, 2, 4, 2, 10, 4, 16, 6, 22, 28, 10, 12, 40, 14, 46, 52, 58, 20, 22, 70, 24, 26, 82, 88, 32, 100, 34, 106, 36, 112, 42, 130, 136, 46, 148, 50, 52, 54, 166, 172, 178, 60, 190, 64, 196, 66, 70, 74, 226, 76, 232, 238, 80
Offset: 1

Views

Author

Carmine Suriano, Apr 22 2014

Keywords

Examples

			a(4) = 2 for residues of x^3 (mod 7 = prime(4)) are 1 and 6.
a(3) = 4 for residues of x^3 (mod 5 = prime(3)) are 1, 2, 3, 4.
		

Crossrefs

Programs

  • Maple
    seq((ithprime(n)-1)/gcd(3,ithprime(n)-1), n=1..80); # Ridouane Oudra, Mar 13 2025

Formula

If prime(n)-1 = 3k then a(n) = k otherwise a(n) = prime(n)-1.
a(n) = A006093(n)/gcd(A006093(n),3). - Ridouane Oudra, Mar 13 2025

Extensions

a(20) corrected by Ridouane Oudra, Mar 13 2025
Showing 1-10 of 20 results. Next