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

A152676 a(n) = A002144(n) - A002314(n).

Original entry on oeis.org

3, 8, 13, 17, 31, 32, 30, 50, 46, 55, 75, 91, 76, 98, 100, 105, 129, 93, 162, 112, 183, 122, 144, 177, 241, 187, 217, 228, 155, 288, 203, 189, 213, 311, 269, 274, 334, 381, 266, 392, 254, 382, 348, 413, 301, 286, 489, 439, 483, 553, 516, 476, 578, 423, 487, 504
Offset: 1

Views

Author

Artur Jasinski, Dec 10 2008

Keywords

Comments

For the four numbers {1, A002314(n), A152676(n), A152680(n)}, the multiplication table modulo A002144(n) is isomorphic with the Latin square
1 2 3 4
2 4 1 3
3 1 4 2
4 3 2 1
and is isomorphic with the multiplication table for {1,i,-i,-1} where i = sqrt(-1), A152680(n) is isomorphic with -1, A002314(n) with i or -i and A152676(n) vice versa -i or i.
1, A002314(n), A152676(n), A152680(n) are a subfield of the Galois Field [A002144(n)].
Let p = A002144(n), the n-th prime of the form 4k+1. Then a(n) and A002314(n) are the two square roots of -1 (mod p). Note that a(n) is also the multiplicative inverse of A002314(n) (mod p). - T. D. Noe, Feb 18 2010

Crossrefs

Programs

  • Mathematica
    aa = {}; Do[If[Mod[Prime[n], 4] == 1, k = 1; While[ ! Mod[k^2 + 1, Prime[n]] == 0, k++ ]; AppendTo[aa, Prime[n] - k]], {n, 1, 200}]; aa

A186814 a(n) = smallest number m such that A002144(n) divides gcd(A002314(n)^2+1,(A002314(n)+m)^2+1).

Original entry on oeis.org

1, 3, 9, 5, 25, 23, 7, 39, 19, 21, 53, 81, 43, 83, 63, 61, 101, 13, 143, 31, 169, 15, 55, 113, 225, 105, 157, 175, 17, 263, 89, 41, 77, 269, 165, 159, 271, 361, 123, 363, 75, 315, 239, 365, 93, 51, 437, 321, 397, 529, 439, 351, 543, 229, 333, 355, 449, 557, 625, 431, 517, 27, 583
Offset: 1

Views

Author

Michel Lagneau, Feb 27 2011

Keywords

Comments

Sequence A002314 gives the minimal integer square root of -1 modulo p(n),where p(n) = n-th prime of form 4k+1.

Examples

			for n=1, k = A002314(1) = 2 => a(1) = 1, because 2^2+1 = 5 and (2+1)^2+1 = 2*5 ;
for n=2, k = A002314(2) = 5 => a(2) = 3, because 5^2+1 = 2*13 and (5+3)^2+1 = 5*13 ;
for n=3, k = A002314(3) = 4 => a(3) = 9, because 4^2+1 = 17 and (4+9)^2+1 = 2*5*17;
for n=4, k = A002314(4)= 12 => a(4)= 5, because 12^2+1
= 5*29 and (12+5)^2+1 = 2*5*29, and 29 divides
GCD(5*29, 2*5*29)=145.
		

Crossrefs

Programs

  • Maple
    with(numtheory):T:=array(1..90):j:=1:for i from 1 to 250 do:x:=4*i+1:if type(x,prime)=true
      then T[j]:=x:j:=j+1:else fi:od:for p from 1 to j do:u:=T[p]:id:=0: for m from
      1 to 1000 while(id=0) do: z:=m^2+1:for d from 1 to u while(id=0) do: z1:=(m+d)^2+1:zz:=
      gcd(z,z1):if irem(zz,u)=0 then id:=1:printf(`%d, `,d):else fi:od:od:od:

A002144 Pythagorean primes: primes of the form 4*k + 1.

Original entry on oeis.org

5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 541, 557, 569, 577, 593, 601, 613, 617
Offset: 1

Views

Author

Keywords

Comments

Rational primes that decompose in the field Q(sqrt(-1)). - N. J. A. Sloane, Dec 25 2017
These are the prime terms of A009003.
-1 is a quadratic residue mod a prime p if and only if p is in this sequence.
Sin(a(n)*Pi/2) = 1 with Pi = 3.1415..., see A070750. - Reinhard Zumkeller, May 04 2002
If at least one of the odd primes p, q belongs to the sequence, then either both or neither of the congruences x^2 = p (mod q), x^2 = q (mod p) are solvable, according to Gauss reciprocity law. - Lekraj Beedassy, Jul 17 2003
Odd primes such that binomial(p-1, (p-1)/2) == 1 (mod p). - Benoit Cloitre, Feb 07 2004
Primes that are the hypotenuse of a right triangle with integer sides. The Pythagorean triple is {A002365(n), A002366(n), a(n)}.
Also, primes of the form a^k + b^k, k > 1. - Amarnath Murthy, Nov 17 2003
The square of a(n) is the average of two other squares. This fact gives rise to a class of monic polynomials x^2 + bx + c with b = a(n) that will factor over the integers regardless of the sign of c. See A114200. - Owen Mertens (owenmertens(AT)missouristate.edu), Nov 16 2005
Also such primes p that the last digit is always 1 for the Nexus numbers of form n^p - (n-1)^p. - Alexander Adamchuk, Aug 10 2006
The set of Pythagorean primes is a proper subset of the set of positive fundamental discriminants (A003658). - Paul Muljadi, Mar 28 2008
A079260(a(n)) = 1; complement of A137409. - Reinhard Zumkeller, Oct 11 2008
From Artur Jasinski, Dec 10 2008: (Start)
If we take 4 numbers: 1, A002314(n), A152676(n), A152680(n) then multiplication table modulo a(n) is isomorphic to the Latin square:
1 2 3 4
2 4 1 3
3 1 4 2
4 3 2 1
and isomorphic to the multiplication table of {1, i, -i, -1} where i is sqrt(-1), A152680(n) is isomorphic to -1, A002314(n) with i or -i and A152676(n) vice versa -i or i. 1, A002314(n), A152676(n), A152680(n) are subfield of Galois field [a(n)]. (End)
Primes p such that the arithmetic mean of divisors of p^3 is an integer. There are 2 sequences of such primes: this one and A002145. - Ctibor O. Zizka, Oct 20 2009
Equivalently, the primes p for which the smallest extension of F_p containing the square roots of unity (necessarily F_p) contains the 4th roots of unity. In this respect, the n = 2 case of a family of sequences: see n=3 (A129805) and n=5 (A172469). - Katherine E. Stange, Feb 03 2010
Subsequence of A007969. - Reinhard Zumkeller, Jun 18 2011
A151763(a(n)) = 1.
k^k - 1 is divisible by 4*k + 1 if 4*k + 1 is a prime (see Dickson reference). - Gary Detlefs, May 22 2013
Not only are the squares of these primes the sum of two nonzero squares, but the primes themselves are also. 2 is the only prime equal to the sum of two nonzero squares and whose square is not. 2 is therefore not a Pythagorean prime. - Jean-Christophe Hervé, Nov 10 2013
The statement that these primes are the sum of two nonzero squares follows from Fermat's theorem on the sum of two squares. - Jerzy R Borysowicz, Jan 02 2019
The decompositions of the prime and its square into two nonzero squares are unique. - Jean-Christophe Hervé, Nov 11 2013. See the Dickson reference, Vol. II, (B) on p. 227. - Wolfdieter Lang, Jan 13 2015
p^e for p prime of the form 4*k+1 and e >= 1 is the sum of 2 nonzero squares. - Jon Perry, Nov 23 2014
Primes p such that the area of the isosceles triangle of sides (p, p, q) for some integer q is an integer. - Michel Lagneau, Dec 31 2014
This is the set of all primes that are the average of two squares. - Richard R. Forberg, Mar 01 2015
Numbers k such that ((k-3)!!)^2 == -1 (mod k). - Thomas Ordowski, Jul 28 2016
This is a subsequence of primes of A004431 and also of A016813. - Bernard Schott, Apr 30 2022
In addition to the comment from Jean-Christophe Hervé, Nov 10 2013: All powers as well as the products of any of these primes are the sum of two nonzero squares. They are terms of A001481, which is closed under multiplication. - Klaus Purath, Nov 19 2023

Examples

			The following table shows the relationship between several closely related sequences:
Here p = A002144 = primes == 1 (mod 4), p = a^2+b^2 with a < b;
a = A002331, b = A002330, t_1 = ab/2 = A070151;
p^2 = c^2 + d^2 with c < d; c = A002366, d = A002365,
t_2 = 2ab = A145046, t_3 = b^2 - a^2 = A070079,
with {c,d} = {t_2, t_3}, t_4 = cd/2 = ab(b^2-a^2).
  ---------------------------------
   p  a  b  t_1  c   d t_2 t_3  t_4
  ---------------------------------
   5  1  2   1   3   4   4   3    6
  13  2  3   3   5  12  12   5   30
  17  1  4   2   8  15   8  15   60
  29  2  5   5  20  21  20  21  210
  37  1  6   3  12  35  12  35  210
  41  4  5  10   9  40  40   9  180
  53  2  7   7  28  45  28  45  630
  ...
a(7) = 53 = A002972(7)^2 + (2*A002973(7))^2 = 7^2 + (2*1)^2 = 49 + 4, and this is the only way. - _Wolfdieter Lang_, Jan 13 2015
		

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
  • L. E. Dickson, "History of the Theory of Numbers", Chelsea Publishing Company, 1919, Vol I, page 386
  • L. E. Dickson, History of the Theory of Numbers, Carnegie Institution, Publ. No. 256, Vol. II, Washington D.C., 1920, p. 227.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 132.
  • M. du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; see p. 76.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 241, 243.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 90.

Crossrefs

Cf. A004613 (multiplicative closure).
Apart from initial term, same as A002313.
For values of n see A005098.
Primes in A020668.

Programs

  • Haskell
    a002144 n = a002144_list !! (n-1)
    a002144_list = filter ((== 1) . a010051) [1,5..]
    -- Reinhard Zumkeller, Mar 06 2012, Feb 22 2011
    
  • Magma
    [a: n in [0..200] | IsPrime(a) where a is 4*n + 1 ]; // Vincenzo Librandi, Nov 23 2014
    
  • Maple
    a := []; for n from 1 to 500 do if isprime(4*n+1) then a := [op(a),4*n+1]; fi; od: A002144 := n->a[n];
    # alternative
    A002144 := proc(n)
        option remember ;
        local a;
        if n = 1 then
            5;
        else
            for a from procname(n-1)+4 by 4 do
                if isprime(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A002144(n),n=1..100) ; # R. J. Mathar, Jan 31 2024
  • Mathematica
    Select[4*Range[140] + 1, PrimeQ[ # ] &] (* Stefan Steinerberger, Apr 16 2006 *)
    Select[Prime[Range[150]],Mod[#,4]==1&] (* Harvey P. Dale, Jan 28 2021 *)
  • PARI
    select(p->p%4==1,primes(1000))
    
  • PARI
    A002144_next(p=A2144[#A2144])={until(isprime(p+=4),);p} /* NB: p must be of the form 4k+1. Beyond primelimit, this is *much* faster than forprime(p=...,, p%4==1 && return(p)). */
    A2144=List(5); A002144(n)={while(#A2144A002144_next())); A2144[n]}
    \\ M. F. Hasler, Jul 06 2024
    
  • Python
    from sympy import prime
    A002144 = [n for n in (prime(x) for x in range(1,10**3)) if not (n-1) % 4]
    # Chai Wah Wu, Sep 01 2014
    
  • Python
    from sympy import isprime
    print(list(filter(isprime, range(1, 618, 4)))) # Michael S. Branicky, May 13 2021
    
  • SageMath
    def A002144_list(n): # returns all Pythagorean primes <= n
        return [x for x in prime_range(5,n+1) if x % 4 == 1]
    A002144_list(617) # Peter Luschny, Sep 12 2012

Formula

Odd primes of form x^2 + y^2, (x=A002331, y=A002330, with x < y) or of form u^2 + 4*v^2, (u = A002972, v = A002973, with u odd). - Lekraj Beedassy, Jul 16 2004
p^2 - 1 = 12*Sum_{i = 0..floor(p/4)} floor(sqrt(i*p)) where p = a(n) = 4*n + 1. [Shirali]
a(n) = A000290(A002972(n)) + A000290(2*A002973(n)) = A000290(A002331(n+1)) + A000290(A002330(n+1)). - Reinhard Zumkeller, Feb 16 2010
a(n) = A002972(n)^2 + (2*A002973(n))^2, n >= 1. See the Jean-Christophe Hervé Nov 11 2013 comment. - Wolfdieter Lang, Jan 13 2015
a(n) = 4*A005098(n) + 1. - Zak Seidov, Sep 16 2018
From Vaclav Kotesovec, Apr 30 2020: (Start)
Product_{k>=1} (1 - 1/a(k)^2) = A088539.
Product_{k>=1} (1 + 1/a(k)^2) = A243380.
Product_{k>=1} (1 - 1/a(k)^3) = A334425.
Product_{k>=1} (1 + 1/a(k)^3) = A334424.
Product_{k>=1} (1 - 1/a(k)^4) = A334446.
Product_{k>=1} (1 + 1/a(k)^4) = A334445.
Product_{k>=1} (1 - 1/a(k)^5) = A334450.
Product_{k>=1} (1 + 1/a(k)^5) = A334449. (End)
From Vaclav Kotesovec, May 05 2020: (Start)
Product_{k>=1} (1 + 1/A002145(k)) / (1 + 1/a(k)) = Pi/(4*A064533^2) = 1.3447728438248695625516649942427635670667319092323632111110962...
Product_{k>=1} (1 - 1/A002145(k)) / (1 - 1/a(k)) = Pi/(8*A064533^2) = 0.6723864219124347812758324971213817835333659546161816055555481... (End)
Sum_{k >= 1} 1/a(k)^s = (1/2) * Sum_{n >= 1 odd numbers} moebius(n) * log((2*n*s)! * zeta(n*s) * abs(EulerE(n*s - 1)) / (Pi^(n*s) * 2^(2*n*s) * BernoulliB(2*n*s) * (2^(n*s) + 1) * (n*s - 1)!))/n, s >= 3 odd number. - Dimitris Valianatos, May 21 2020
Legendre symbol (-1, a(n)) = +1, for n >= 1. - Wolfdieter Lang, Mar 03 2021

A209874 Least m > 0 such that the prime p=A002313(n+1) divides m^2+1.

Original entry on oeis.org

1, 2, 8, 4, 12, 6, 32, 30, 50, 46, 34, 22, 10, 76, 98, 100, 44, 28, 80, 162, 112, 14, 122, 144, 64, 16, 82, 60, 228, 138, 288, 114, 148, 136, 42, 104, 274, 334, 20, 266, 392, 254, 382, 348, 48, 208, 286, 52, 118, 86, 24, 516, 476, 578, 194, 154, 504, 106, 58, 26, 566, 96, 380, 670, 722, 62, 456, 582, 318, 526, 246, 520, 650, 726, 494, 324
Offset: 0

Views

Author

M. F. Hasler, Mar 11 2012

Keywords

Comments

This yields the prime factors of numbers of the form N^2+1, cf. formula in A089120: For n=0,1,2,... check whether N = +/- a(n) [mod 2*A002313(n+1)], if so, then A002313(n+1) is a prime factor of N^2+1.
Obviously, p then divides (2kp +/- a(n))^2+1 for all k >=0 ; in particular it will be the least prime factor of such numbers if there is no earlier match.
Alternatively one could deal separately with the case of odd N, for which p=2 divides N^2+1, and even N, for which only Pythagorean primes A002144(n)=A002313(n+1) can be prime factors of N^2+1.

Crossrefs

Programs

  • PARI
    A209874(n)=if( n, 2*lift(sqrt(Mod(-1, A002144[n])/4)), 1)
    
  • PARI
    /* for illustrative purpose: a(n) is the smaller of the 2 possible remainders mod 2*p of numbers N such that N^2+1 has p as smallest prime factor */ forprime( p=1,199, p>2 & p%4 != 1 & next; my(c=[]); for(i=1,9e9, factor(i^2+1)[1,1]==p |next; c=vecsort(concat(c,i%(2*p)),,8); #c==1 || print1(","c[1]) || break))

Formula

For n>0, A209874(n) = 2*sqrt(-1/4 mod A002144(n)), where sqrt(a mod p) stands for the positive x < p/2 such that x^2=a in Z/pZ.
A209874(n) = A209877(n)*2 for n>0.

A256011 Integers n with the property that the largest prime factor of n^2 + 1 is less than n.

Original entry on oeis.org

7, 18, 21, 38, 41, 43, 47, 57, 68, 70, 72, 73, 83, 99, 111, 117, 119, 123, 128, 132, 133, 142, 157, 172, 173, 174, 182, 185, 191, 192, 193, 200, 211, 212, 216, 233, 237, 239, 242, 251, 253, 255, 265, 268, 273, 278, 293, 294, 302, 305, 307, 313, 319, 322, 327
Offset: 1

Views

Author

Michael Kaltman, May 31 2015

Keywords

Comments

Every Pythagorean prime, p, can be written as the sum of two positive integers, a and b, such that ab is congruent to 1 (mod p). Further: no number is the addend of two different primes, and the numbers that are NEVER addends are precisely the numbers in this list.
In particular: 5 = 2+3 and 2*3 = 6 == 1 (mod 5), 13 = 5+8 and 5*8 = 40 == 1 (mod 13), 17 = 4+13 and 4*13 = 52 == 1 (mod 17), 29 = 12+17 and 12*17 = 204 == 1 (mod 29), and so on.
Every integer greater than 1 is in exactly one of A002314, A152676, and the present sequence. - Michael Kaltman, May 11 2019

Examples

			7^2 + 1 = 50 = 2 * 5^2;
18^2 + 1 = 325 = 5^2 * 13;
21^2 + 1 = 442 = 2 * 13 * 17.
		

Crossrefs

Cf. A002144 (Pythagorean primes), A014442, A002314, A152676.

Programs

  • Magma
    [k:k in [1..330]| Max(PrimeDivisors(k^2+1)) lt k]; // Marius A. Burtea, Jul 27 2019
  • Maple
    select(n -> max(numtheory:-factorset(n^2+1))Robert Israel, Jun 09 2015
  • Mathematica
    Select[Range[10^4], FactorInteger [#^2 + 1][[-1, 1]] < # &] (* Giovanni Resta, Jun 09 2015 *)
  • PARI
    for(n=1,10^3,N=n^2+1;if(factor(N)[,1][omega(N)] < n,print1(n,", "))) \\ Derek Orr, Jun 08 2015
    
  • PARI
    is(n)=my(f=factor(n^2+1)[,1]); f[#f]Charles R Greathouse IV, Jun 09 2015
    

A152680 a(n) = 4*A005098(n) = A002144(n) - 1.

Original entry on oeis.org

4, 12, 16, 28, 36, 40, 52, 60, 72, 88, 96, 100, 108, 112, 136, 148, 156, 172, 180, 192, 196, 228, 232, 240, 256, 268, 276, 280, 292, 312, 316, 336, 348, 352, 372, 388, 396, 400, 408, 420, 432, 448, 456, 460, 508, 520, 540, 556, 568, 576, 592, 600, 612, 616
Offset: 1

Views

Author

Artur Jasinski, Dec 10 2008

Keywords

Comments

If we take the 4 numbers 1, A002314(n), A152676(n), A152680(n) then the multiplication table modulo A002144(n) is isomorphic with the Latin square
1 2 3 4
2 4 1 3
3 1 4 2
4 3 2 1
and isomorphic with the multiplication table of {1,I,-I,-1} where I is sqrt(-1), A152680(n) is isomorphic with -1, A002314(n) with I or -I and A152676(n) vice versa -I or I.
1, A002314(n), A152676(n), A152680(n) are subfields of the Galois Field [A002144(n)].
Numbers n such that A172019(n) + 1 = primes - 1. - Giovanni Teofilatto, Feb 02 2010

Crossrefs

Programs

  • Mathematica
    aa = {}; Do[If[Mod[Prime[n], 4] == 1, AppendTo[aa, Prime[n] - 1]], {n, 1, 200}]; aa

A155095 Numbers k such that k^2 == -1 (mod 17).

Original entry on oeis.org

4, 13, 21, 30, 38, 47, 55, 64, 72, 81, 89, 98, 106, 115, 123, 132, 140, 149, 157, 166, 174, 183, 191, 200, 208, 217, 225, 234, 242, 251, 259, 268, 276, 285, 293, 302, 310, 319, 327, 336, 344, 353, 361, 370, 378, 387, 395, 404, 412, 421, 429, 438, 446, 455
Offset: 1

Views

Author

Vincenzo Librandi, Jan 20 2009

Keywords

Comments

The first pair (a,b) is such that a+b=p, a*b=p*h+1, with h<=(p-1)/4; other pairs are given by(a+kp, b+kp), k=1,2,3...
Numbers congruent to {4, 13} mod 17. - Amiram Eldar, Feb 27 2023

Crossrefs

Programs

  • Mathematica
    Select[Range[500],PowerMod[#,2,17]==16&] (* or *) LinearRecurrence[ {1,1,-1},{4,13,21},60] (* Harvey P. Dale, Jun 25 2011 *)
  • PARI
    A155095(n)=n\2*17-4*(-1)^n /* M. F. Hasler, Jun 16 2010 */

Formula

From M. F. Hasler, Jun 16 2010: (Start)
a(n) = 4*(-1)^(n+1) + 17*floor(n/2).
a(2k+1) = 17 k + a(1), a(2k) = 17 k - a(1), with a(1) = A002314(3) since 17 = A002144(3).
a(n) = a(n-2) + 17 for all n > 2. (End)
From Bruno Berselli, Sep 26 2010: (Start)
G.f.: x*(4+9*x+4*x^2)/((1+x)*(1-x)^2).
a(n) - a(n-1) - a(n-2) + a(n-3) = 0 for n > 3.
a(n) = (34*n + (-1)^n - 17)/4. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(9*Pi/34)*Pi/17. - Amiram Eldar, Feb 27 2023

Extensions

Terms checked & minor edits by M. F. Hasler, Jun 16 2010

A155096 Numbers k such that k^2 == -1 (mod 29).

Original entry on oeis.org

12, 17, 41, 46, 70, 75, 99, 104, 128, 133, 157, 162, 186, 191, 215, 220, 244, 249, 273, 278, 302, 307, 331, 336, 360, 365, 389, 394, 418, 423, 447, 452, 476, 481, 505, 510, 534, 539, 563, 568, 592, 597, 621, 626, 650, 655, 679, 684, 708, 713, 737, 742, 766
Offset: 1

Views

Author

Vincenzo Librandi, Jan 20 2009

Keywords

Comments

Numbers k such that k == 12 or 17 (mod 29). - Charles R Greathouse IV, Dec 27 2011
The first pair (a,b) is such that a+b=p, a*b=p*h+1, with h<=(p-1)/4; subsequent pairs are given as (a+kp, b+kp), k=1,2,3,...

Examples

			Let p = 29, a+b=29, a*b=29h+1, h<=7; for h=7, a+b=29, a*b=204, a=12, b=17; other pairs (12+29, 17+29) and so on.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,1,-1},{12,17,41},100] (* Vincenzo Librandi, Feb 29 2012 *)
    Select[Range[800], PowerMod[#, 2, 29] == 28 &] (* Vincenzo Librandi, Apr 24 2014 *)
    CoefficientList[Series[(12 + 5 x + 12 x^2)/((1 + x) (1 - x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, May 03 2014 *)
  • PARI
    A155096(n)=n\2*29-12*(-1)^n /* M. F. Hasler, Jun 16 2010 */

Formula

From M. F. Hasler, Jun 16 2010: (Start)
a(n) = 12*(-1)^(n+1) + 29 [n/2].
a(2k+1) = 29 k + a(1), a(2k) = 29 k - a(1), with a(1) = A002314(4) since 29 = A002144(4).
a(n) = a(n-2) + 29 for all n > 2. (End)
G.f.: x*(12 + 5*x + 12*x^2)/((1 + x)*(1 - x)^2). - Vincenzo Librandi, May 03 2014
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(5*Pi/58)*Pi/29. - Amiram Eldar, Feb 27 2023

Extensions

Terms checked & minor edits by M. F. Hasler, Jun 16 2010

A155097 Numbers k such that k^2 == -1 (mod 37).

Original entry on oeis.org

6, 31, 43, 68, 80, 105, 117, 142, 154, 179, 191, 216, 228, 253, 265, 290, 302, 327, 339, 364, 376, 401, 413, 438, 450, 475, 487, 512, 524, 549, 561, 586, 598, 623, 635, 660, 672, 697, 709, 734, 746, 771, 783, 808, 820, 845, 857, 882, 894, 919, 931, 956, 968
Offset: 1

Views

Author

Vincenzo Librandi, Jan 20 2009

Keywords

Comments

Numbers k such that k == 6 or 31 (mod 37). - Charles R Greathouse IV, Dec 27 2011

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,1,-1},{6,31,43},100] (* Vincenzo Librandi, Feb 29 2012 *)
    Select[Range[1000],PowerMod[#,2,37]==36&] (* Harvey P. Dale, May 06 2012 *)
    CoefficientList[Series[(6 + 25 x + 6 x^2)/((1 + x) (1 - x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, May 03 2014 *)
  • PARI
    A155097(n)=n\2*37-6*(-1)^n /* M. F. Hasler, Jun 16 2010 */

Formula

From M. F. Hasler, Jun 16 2010: (Start)
a(n) = 6*(-1)^(n+1) + 37*floor(n/2).
a(2k+1) = 37*k + a(1), a(2k) = 37*k - a(1), with a(1) = A002314(5) since 37 = A002144(5).
a(n) = a(n-2) + 37 for all n > 2. (End)
G.f.: x*(6 + 25*x + 6*x^2)/((1 + x)*(1 - x)^2). - Vincenzo Librandi, May 03 2014
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(6*Pi/37)*Pi/37. - Amiram Eldar, Feb 26 2023

Extensions

Terms checked, a(28) corrected, and minor edits by M. F. Hasler, Jun 16 2010

A155098 Numbers k such that k^2 == -1 (mod 41).

Original entry on oeis.org

9, 32, 50, 73, 91, 114, 132, 155, 173, 196, 214, 237, 255, 278, 296, 319, 337, 360, 378, 401, 419, 442, 460, 483, 501, 524, 542, 565, 583, 606, 624, 647, 665, 688, 706, 729, 747, 770, 788, 811, 829, 852, 870, 893, 911, 934, 952, 975, 993, 1016, 1034, 1057
Offset: 1

Views

Author

Vincenzo Librandi, Jan 20 2009

Keywords

Comments

Numbers k such that k == 9 or 32 (mod 41). - Charles R Greathouse IV, Dec 27 2011

Crossrefs

Programs

Formula

From M. F. Hasler, Jun 16 2010: (Start)
a(n) = 9*(-1)^(n+1) + 41*floor(n/2).
a(2k+1) = 41*k + a(1), a(2k) = 41*k - a(1), with a(1) = A002314(6) since 41 = A002144(6).
a(n) = a(n-2) + 41 for all n > 2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(9*Pi/41)*Pi/41. - Amiram Eldar, Feb 26 2023

Extensions

Terms checked & minor edits by M. F. Hasler, Jun 16 2010
Showing 1-10 of 17 results. Next