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

A002145 Primes of the form 4*k + 3.

Original entry on oeis.org

3, 7, 11, 19, 23, 31, 43, 47, 59, 67, 71, 79, 83, 103, 107, 127, 131, 139, 151, 163, 167, 179, 191, 199, 211, 223, 227, 239, 251, 263, 271, 283, 307, 311, 331, 347, 359, 367, 379, 383, 419, 431, 439, 443, 463, 467, 479, 487, 491, 499, 503, 523, 547, 563, 571
Offset: 1

Views

Author

Keywords

Comments

Or, odd primes p such that -1 is not a square mod p, i.e., the Legendre symbol (-1/p) = -1. [LeVeque I, p. 66]. - N. J. A. Sloane, Jun 28 2008
Primes which are not the sum of two squares, see the comment in A022544. - Artur Jasinski, Nov 15 2006
Natural primes which are also Gaussian primes. (It is a common error to refer to this sequence as "the Gaussian primes".)
Inert rational primes in the field Q(sqrt(-1)). - N. J. A. Sloane, Dec 25 2017
Numbers n such that the product of coefficients of (2n)-th cyclotomic polynomial equals -1. - Benoit Cloitre, Oct 22 2002
For p and q both belonging to the sequence, exactly one of the congruences x^2 = p (mod q), x^2 = q (mod p) is solvable, according to Gauss reciprocity law. - Lekraj Beedassy, Jul 17 2003
Also primes p that divide L((p-1)/2) or L((p+1)/2), where L(n) = A000032(n), the Lucas numbers. Union of A122869 and A122870. - Alexander Adamchuk, Sep 16 2006
Also odd primes p that divide ((p-1)!! + 1) or ((p-2)!! + 1). - Alexander Adamchuk, Nov 30 2006
Also odd primes p that divide ((p-1)!! - 1) or ((p-2)!! - 1). - Alexander Adamchuk, Apr 18 2007
This sequence is a proper subset of the set of the absolute values of negative fundamental discriminants (A003657). - Paul Muljadi, Mar 29 2008
Bernard Frénicle de Bessy discovered that such primes cannot be the hypotenuse of a Pythagorean triangle in opposition to primes of the form 4*n+1 (see A002144). - after Paul Curtz, Sep 10 2008
A079261(a(n)) = 1; complement of A145395. - Reinhard Zumkeller, Oct 12 2008
Subsequence of A007970. - Reinhard Zumkeller, Jun 18 2011
A151763(a(n)) = -1.
Primes p such that p XOR 2 = p - 2. Brad Clardy, Oct 25 2011 (Misleading in the sense that this is a formula for the super-sequence A004767. - R. J. Mathar, Jul 28 2014)
It appears that each term of A004767 is the mean of two terms of this subsequence of primes therein; cf. A245203. - M. F. Hasler, Jul 13 2014
Numbers n > 2 such that ((n-2)!!)^2 == 1 (mod n). - Thomas Ordowski, Jul 24 2016
Odd numbers n > 1 such that ((n-1)!!)^2 == 1 (mod n). - Thomas Ordowski, Jul 25 2016
Primes p such that (p-2)!! == (p-3)!! (mod p). - Thomas Ordowski, Jul 28 2016
See Granville and Martin for a discussion of the relative numbers of primes of the form 4k+1 and 4k+3. - Editors, May 01 2017
Sometimes referred to as Blum primes for their connection to A016105 and the Blum Blum Shub generator. - Charles R Greathouse IV, Jun 14 2018
Conjecture: a(n) for n > 4 can be written as a sum of 3 primes of the form 4k+1, which would imply that primes of the form 4k+3 >= 23 can be decomposed into a sum of 6 nonzero squares. - Thomas Scheuerle, Feb 09 2023

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 146-147.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 219, th. 252.
  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 66.
  • 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).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 90.

Crossrefs

Apart from initial term, same as A045326.
Cf. A016105.
Cf. A004614 (multiplicative closure).

Programs

  • Haskell
    a002145 n = a002145_list !! (n-1)
    a002145_list = filter ((== 1) . a010051) [3, 7 ..]
    -- Reinhard Zumkeller, Aug 02 2015, Sep 23 2011
    
  • Magma
    [4*n+3 : n in [0..142] | IsPrime(4*n+3)]; // Arkadiusz Wesolowski, Nov 15 2013
    
  • Maple
    A002145 := proc(n)
        option remember;
        if n = 1 then
            3;
        else
            a := nextprime(procname(n-1)) ;
            while a mod 4 <>  3 do
                a := nextprime(a) ;
            end do;
            return a;
        end if;
    end proc:
    seq(A002145(n),n=1..20) ; # R. J. Mathar, Dec 08 2011
  • Mathematica
    Select[4Range[150] - 1, PrimeQ] (* Alonso del Arte, Dec 19 2013 *)
    Select[ Prime@ Range[2, 110], Length@ PowersRepresentations[#^2, 2, 2] == 1 &] (* or *)
    Select[ Prime@ Range[2, 110], JacobiSymbol[-1, #] == -1 &] (* Robert G. Wilson v, May 11 2014 *)
  • PARI
    forprime(p=2,1e3,if(p%4==3,print1(p", "))) \\ Charles R Greathouse IV, Jun 10 2011
    
  • Sage
    def A002145_list(n): return [p for p in prime_range(1, n + 1) if p % 4 == 3]  # Peter Luschny, Jul 29 2014

Formula

Remove from A000040 terms that are in A002313.
Intersection of A000040 and A004767. - Alonso del Arte, Apr 22 2014
From Vaclav Kotesovec, Apr 30 2020: (Start)
Product_{k>=1} (1 - 1/a(k)^2) = A243379.
Product_{k>=1} (1 + 1/a(k)^2) = A243381.
Product_{k>=1} (1 - 1/a(k)^3) = A334427.
Product_{k>=1} (1 + 1/a(k)^3) = A334426.
Product_{k>=1} (1 - 1/a(k)^4) = A334448.
Product_{k>=1} (1 + 1/a(k)^4) = A334447.
Product_{k>=1} (1 - 1/a(k)^5) = A334452.
Product_{k>=1} (1 + 1/a(k)^5) = A334451. (End)
From Vaclav Kotesovec, May 05 2020: (Start)
Product_{k>=1} (1 + 1/a(k)) / (1 + 1/A002144(k)) = Pi/(4*A064533^2) = 1.3447728438248695625516649942427635670667319092323632111110962...
Product_{k>=1} (1 - 1/a(k)) / (1 - 1/A002144(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 * (2^(n*s) - 1) * (n*s - 1)! * zeta(n*s) / (Pi^(n*s) * abs(EulerE(n*s - 1))))/n, s >= 3 odd number. - Dimitris Valianatos, May 20 2020

Extensions

More terms from James Sellers, Apr 21 2000

A001348 Mersenne numbers: 2^p - 1, where p is prime.

Original entry on oeis.org

3, 7, 31, 127, 2047, 8191, 131071, 524287, 8388607, 536870911, 2147483647, 137438953471, 2199023255551, 8796093022207, 140737488355327, 9007199254740991, 576460752303423487, 2305843009213693951, 147573952589676412927, 2361183241434822606847
Offset: 1

Views

Author

Keywords

Comments

Mersenne numbers A000225 whose indices are primes. - Omar E. Pol, Aug 31 2008
All terms are of the form 4k-1. - Paul Muljadi, Jan 31 2011
Smallest number with Hamming weight A000120 = prime(n). - M. F. Hasler, Oct 16 2018
The 5th, 9th, 10th, ... terms are not prime. See A000668 and A065341 for the primes and for the composites in this sequence. - M. F. Hasler, Nov 14 2018 [corrected by Jerzy R Borysowicz, Apr 08 2025]
Except for the first term 3: all prime factors of 2^p-1 must be 1 or -1 (mod 8), and 1 (mod 2p). - William Hu, Mar 10 2024

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 16.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 47.
  • 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).

Crossrefs

Programs

  • Magma
    [2^NthPrime(n)-1: n in [1..30]]; // Vincenzo Librandi, Feb 04 2016
    
  • Maple
    A001348 := n -> 2^(ithprime(n))-1: seq (A001348(n), n=1..18);
  • Mathematica
    Table[2^Prime[n]-1, {n, 20}] (* Vladimir Joseph Stephan Orlovsky, Aug 26 2008 *)
  • PARI
    a(n)=1<Charles R Greathouse IV, Jun 10 2011
    
  • Python
    from sympy import prime
    def a(n): return 2**prime(n)-1
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Mar 28 2022

Formula

a(n) = 2^A000040(n) - 1, n >= 1. - Wolfdieter Lang, Oct 26 2014
a(n) = A000225(A000040(n)). - Omar E. Pol, Aug 31 2008
A000668(n) = a(A016027(n)). - Omar E. Pol, Jun 29 2012
Sum_{n>=1} 1/a(n) = A262153. - Amiram Eldar, Nov 20 2020
Product_{n>=1} (1 - 1/a(n)) = A184085. - Amiram Eldar, Nov 22 2022

A004144 Nonhypotenuse numbers (indices of positive squares that are not the sums of 2 distinct nonzero squares).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 16, 18, 19, 21, 22, 23, 24, 27, 28, 31, 32, 33, 36, 38, 42, 43, 44, 46, 47, 48, 49, 54, 56, 57, 59, 62, 63, 64, 66, 67, 69, 71, 72, 76, 77, 79, 81, 83, 84, 86, 88, 92, 93, 94, 96, 98, 99, 103, 107, 108, 112, 114, 118, 121, 124, 126, 127
Offset: 1

Views

Author

Keywords

Comments

Also numbers with no prime factors of form 4*k+1.
m is a term iff A072438(m) = m.
Density 0. - Charles R Greathouse IV, Apr 16 2012
Closed under multiplication. Primitive elements are A045326, 2 and the primes of form 4*k+3. - Jean-Christophe Hervé, Nov 17 2013

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Complement of A009003.
The subsequence of primes is A045326.

Programs

  • Haskell
    import Data.List (elemIndices)
    a004144 n = a004144_list !! (n-1)
    a004144_list = map (+ 1) $ elemIndices 0 a005089_list
    -- Reinhard Zumkeller, Jan 07 2013
  • Mathematica
    fQ[n_] := If[n > 1, First@ Union@ Mod[ First@# & /@ FactorInteger@ n, 4] != 1, True]; Select[ Range@ 127, fQ]
    A004144 = Select[Range[127],Length@Reduce[s^2 + t^2 == s # && s > t > 0, Integers] == 0 &] (* Gerry Martens, Jun 09 2020 *)
  • PARI
    is(n)=n==1||vecmin(factor(n)[,1]%4)>1 \\ Charles R Greathouse IV, Apr 16 2012
    
  • PARI
    list(lim)=my(v=List(),u=vectorsmall(lim\=1)); forprimestep(p=5,lim,4, forstep(n=p,lim,p, u[n]=1)); for(i=1,lim, if(u[i]==0, listput(v,i))); u=0; Vec(v) \\ Charles R Greathouse IV, Jan 13 2022
    

Formula

A005089(a(n)) = 0. - Reinhard Zumkeller, Jan 07 2013
The number of terms below x is ~ (A * x / sqrt(log(x))) * (1 + C/log(x) + O(1/log(x)^2)), where A = A244659 and C = A244662 (Shanks, 1975). - Amiram Eldar, Jan 29 2022

Extensions

More terms from Reinhard Zumkeller, Jun 17 2002
Name clarified by Evan M. Bailey, Sep 17 2019

A062327 Number of divisors of n over the Gaussian integers.

Original entry on oeis.org

1, 3, 2, 5, 4, 6, 2, 7, 3, 12, 2, 10, 4, 6, 8, 9, 4, 9, 2, 20, 4, 6, 2, 14, 9, 12, 4, 10, 4, 24, 2, 11, 4, 12, 8, 15, 4, 6, 8, 28, 4, 12, 2, 10, 12, 6, 2, 18, 3, 27, 8, 20, 4, 12, 8, 14, 4, 12, 2, 40, 4, 6, 6, 13, 16, 12, 2, 20, 4, 24, 2, 21, 4, 12, 18, 10, 4, 24, 2, 36, 5, 12, 2, 20, 16, 6
Offset: 1

Views

Author

Reiner Martin, Jul 12 2001

Keywords

Comments

Divisors which are associates are identified (two Gaussian integers z1, z2 are associates if z1 = u * z2 where u is a unit, i.e., one of 1, i, -1, -i).
a(A004614(n)) = A000005(n). - Vladeta Jovovic, Jan 23 2003
a(A004613(n)) = A000005(n)^2. - Benedikt Otten, May 22 2013

Examples

			For example, 5 has divisors 1, 1+2i, 2+i and 5.
		

Crossrefs

Equivalent of arithmetic functions in the ring of Gaussian integers (the corresponding functions in the ring of integers are in the parentheses): this sequence ("d", A000005), A317797 ("sigma", A000203), A079458 ("phi", A000010), A227334 ("psi", A002322), A086275 ("omega", A001221), A078458 ("Omega", A001222), A318608 ("mu", A008683).
Equivalent in the ring of Eisenstein integers: A319442.

Programs

  • Haskell
    a062327 n = product $ zipWith f (a027748_row n) (a124010_row n) where
       f 2 e                  = 2 * e + 1
       f p e | p `mod` 4 == 1 = (e + 1) ^ 2
             | otherwise      = e + 1
    -- Reinhard Zumkeller, Oct 18 2011
    
  • Maple
    a:= n-> mul(`if`(i[1]=2, 2*i[2]+1, `if`(irem(i[1], 4)=3,
                     i[2]+1, (i[2]+1)^2)), i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 09 2021
  • Mathematica
    Table[Length[Divisors[n, GaussianIntegers -> True]], {n, 30}] (* Alonso del Arte, Jan 25 2011 *)
    DivisorSigma[0,Range[90],GaussianIntegers->True] (* Harvey P. Dale, Mar 19 2017 *)
  • PARI
    a(n)=
    {
        my(r=1,f=factor(n));
        for(j=1,#f[,1], my(p=f[j,1],e=f[j,2]);
            if(p==2,r*=(2*e+1));
            if(p%4==1,r*=(e+1)^2);
            if(p%4==3,r*=(e+1));
        );
        return(r);
    }  \\ Joerg Arndt, Dec 09 2016

Formula

Presumably a(n) = 2 iff n is a rational prime == 3 mod 4 (see A045326). - N. J. A. Sloane, Jan 07 2003, Feb 23 2007
Multiplicative with a(2^e) = 2*e+1, a(p^e) = e+1 if p mod 4=3 and a(p^e) = (e+1)^2 if p mod 4=1. - Vladeta Jovovic, Jan 23 2003

A100672 a(1) = 1; thereafter, a(n) = 1 if n-th prime is 3 mod 4, 0 if n-th prime is 1 mod 4.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1
Offset: 1

Views

Author

Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 06 2004

Keywords

Comments

Second least-significant bit in the binary expansion of the n-th prime.
a(n)=1 iff prime(n) is a member of A045326 (equivalently for n>1, iff prime(n)-3 is divisible by 4).

Examples

			a(2)=1 because prime(2)=11_2 (in binary; decimal = 3_10) and its 2^1 bit is 1.
a(3)=0 because prime(3)=101_2 (in binary; decimal = 5_10) and its 2^1 bit is 0.
		

Crossrefs

RUNS transform is essentially A091237.

Programs

  • Maple
    A100672 := proc(n)
            if n = 1 then
                    1 ;
            else
                    ((ithprime(n) mod 4)-1)/2;
            end if;
    end proc: # R. J. Mathar, Oct 06 2011
  • Mathematica
    Table[Reverse[RealDigits[Prime[k], 2][[1]]][[2]], {k, 1, 128}]
  • PARI
    for(k=1,105,print1( bittest(prime(k), 1), ", ")) \\ Washington Bomfim, Jan 18 2011
    
  • Python
    from sympy import prime
    def A100672(n): return int(prime(n)>>1&1) # Chai Wah Wu, Jun 23 2023

Formula

a(n) = 1-A098033(n), n>1. - Steven G. Johnson (stevenj(AT)math.mit.edu), Sep 18 2008
a(n) = floor(prime(n)/2) mod 2. - Alois P. Heinz, Jul 16 2024

Extensions

Edxited by N. J. A. Sloane, Jan 11 2025

A167134 Primes congruent to {2, 3, 5, 7} mod 11.

Original entry on oeis.org

2, 3, 5, 7, 13, 29, 47, 71, 73, 79, 101, 113, 137, 139, 157, 167, 179, 181, 211, 223, 227, 233, 269, 271, 277, 293, 311, 313, 337, 359, 379, 401, 409, 421, 431, 443, 467, 487, 491, 509, 541, 557, 563, 577, 599, 601, 607, 619, 641, 643, 673, 709, 733, 739, 751
Offset: 1

Views

Author

Klaus Brockhaus, Oct 28 2009

Keywords

Comments

Primes p such that p mod 11 is prime.
Primes of the form 11*n+r where n >= 0 and r is in {2, 3, 5, 7}.
2 and primes congruent to {3, 5, 7, 13} mod 22. - Chai Wah Wu, Apr 29 2025

Crossrefs

Cf. A003627, A045326, A003631, A045309, A045314, A042987, A078403, A042993, A167134, A167135, A167119: primes p such that p mod k is prime, for k = 3..13 resp.

Programs

  • Magma
    [ p: p in PrimesUpTo(760) | p mod 11 in {2, 3, 5, 7} ];
    [ p: p in PrimesUpTo(760) | exists(t){ n: n in [0..p div 11] | exists(u){ r: r in {2, 3, 5,7} | p eq (11*n+r) } } ];
  • Mathematica
    Select[Prime[Range[600]],MemberQ[{2, 3, 5, 7},Mod[#,11]]&] (* Vincenzo Librandi, Aug 05 2012 *)

A167135 Primes congruent to {2, 3, 5, 7, 11} mod 12.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 47, 53, 59, 67, 71, 79, 83, 89, 101, 103, 107, 113, 127, 131, 137, 139, 149, 151, 163, 167, 173, 179, 191, 197, 199, 211, 223, 227, 233, 239, 251, 257, 263, 269, 271, 281, 283, 293, 307, 311, 317, 331, 347, 353, 359
Offset: 1

Views

Author

Klaus Brockhaus, Oct 28 2009

Keywords

Comments

Primes p such that p mod 12 is prime.
Primes of the form 12*n+r where n >= 0 and r is in {2, 3, 5, 7, 11}.
Except for the prime 2, these are the primes that are encountered in the set of numbers {x, f(f(x))} where x is of the form 4k+3 with k>=0, and where f(x) is the 3x+1-problem function, and f(f(x)) the second iteration value. Indeed this sequence is the set union of 2 and A002145 (4k+3 primes) and A007528 (6k+5 primes), since f(f(4k+3))=6k+5. Equivalently one does not get any prime from A068228 (the complement of the present sequence). - Michel Marcus and Bill McEachen, May 07 2016

Crossrefs

Subsequences: A002145, A007528. Complement: A068228.
Cf. A003627, A045326, A003631, A045309, A045314, A042987, A078403, A042993, A167134, A167135, A167119: primes p such that p mod k is prime, for k = 3..13 resp.

Programs

  • Magma
    [ p: p in PrimesUpTo(760) | p mod 12 in {2, 3, 5, 7, 11} ];
    
  • Magma
    [ p: p in PrimesUpTo(760) | exists(t){ n: n in [0..p div 12] | exists(u){ r: r in {2, 3, 5,7, 11} | p eq (12*n+r) } } ];
  • Maple
    isA167135  := n -> isprime(n) and not modp(n, 12) != 1:
    select(isA167135, [$1..360]); # Peter Luschny, Mar 28 2018
  • Mathematica
    Select[Prime[Range[400]],MemberQ[{2,3, 5, 7, 11},Mod[#,12]]&] (* Vincenzo Librandi, Aug 05 2012 *)
    Select[Prime[Range[72]], Mod[#, 12] != 1 &] (* Peter Luschny, Mar 28 2018 *)

A270109 a(n) = n^3 + (n+1)*(n+2).

Original entry on oeis.org

2, 7, 20, 47, 94, 167, 272, 415, 602, 839, 1132, 1487, 1910, 2407, 2984, 3647, 4402, 5255, 6212, 7279, 8462, 9767, 11200, 12767, 14474, 16327, 18332, 20495, 22822, 25319, 27992, 30847, 33890, 37127, 40564, 44207, 48062, 52135, 56432, 60959, 65722, 70727, 75980, 81487, 87254
Offset: 0

Views

Author

Bruno Berselli, Mar 11 2016, at the suggestion of Giuseppe Amoruso in BASE Cinque forum

Keywords

Comments

For n>1, many consecutive terms of the sequence are generated by floor(sqrt(n^2 + 2)^3) + n^2 + 2.
It appears that this is a subsequence of A000037 (the nonsquares).
The primes in the sequence belong to A045326.
Inverse binomial transform is 2, 5, 8, 6, 0, 0, 0, ... (0 continued).

Crossrefs

Subsequence of A001651, A047212.
Cf. A027444: numbers of the form n^3+n*(n+1); A085490: numbers of the form n^3+(n-1)*n.
Cf. A008865: numbers of the form n+(n+1)*(n+2); A130883: numbers of the form n^2+(n+1)*(n+2).

Programs

  • Magma
    [n^3+(n+1)*(n+2): n in [0..50]];
  • Mathematica
    Table[n^3 + (n + 1) (n + 2), {n, 0, 50}]
  • Maxima
    makelist(n^3+(n+1)*(n+2), n, 0, 50);
    
  • PARI
    vector(50, n, n--; n^3+(n+1)*(n+2))
    
  • Sage
    [n^3+(n+1)*(n+2) for n in (0..50)]
    

Formula

O.g.f.: (2 - x + 4*x^2 + x^3)/(1 - x)^4.
E.g.f.: (2 + x)*(1 + x)^2*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4), n>3.
a(n+h) - a(n) + a(n-h) = n^3 + n^2 + (6*h^2+3)*n + (2*h^2+2) for any h. This identity becomes a(n) = n^3 + n^2 + 3*n + 2 if h=0.
a(h*a(n) + n) = (h*a(n))^3 + (3*n+1)*(h*a(n))^2 + (3*n^2+2*n+3)*(h*a(n)) + a(n) for any h, therefore a(h*a(n) + n) is always a multiple of a(n).
a(n) + a(-n) = 2*A059100(n) = A255843(n).
a(n) - a(-n) = 4*A229183(n).

A167119 Primes congruent to 2, 3, 5, 7 or 11 (mod 13).

Original entry on oeis.org

2, 3, 5, 7, 11, 29, 31, 37, 41, 59, 67, 83, 89, 107, 109, 137, 163, 167, 193, 197, 211, 223, 239, 241, 263, 271, 293, 317, 349, 353, 367, 379, 397, 401, 419, 421, 431, 449, 457, 479, 499, 509, 523, 557, 577, 587, 601, 613, 631, 653, 661, 683, 691, 709, 733, 739, 743, 757
Offset: 1

Views

Author

Keywords

Comments

Primes which have a remainder mod 13 that is prime.
Union of A141858, A100202, A102732, A140371 and A140373. - R. J. Mathar, Oct 29 2009

Examples

			11 mod 13 = 11, 29 mod 13 = 3, 31 mod 13 = 5, hence 11, 29 and 31 are in the sequence.
		

Crossrefs

Cf. A003627, A045326, A003631, A045309, A045314, A042987, A078403, A042993, A167134, A167135: primes p such that p mod k is prime, for k = 3..12 resp.

Programs

  • Magma
    [ p: p in PrimesUpTo(740) | p mod 13 in {2, 3, 5, 7, 11} ]; // Klaus Brockhaus, Oct 28 2009
  • Mathematica
    f[n_]:=PrimeQ[Mod[n,13]]; lst={};Do[p=Prime[n];If[f[p],AppendTo[lst,p]],{n,6,6!}];lst
    Select[Prime[Range[4000]],MemberQ[{2, 3, 5, 7, 11},Mod[#,13]]&] (* Vincenzo Librandi, Aug 05 2012 *)
  • PARI
    {forprime(p=2, 740, if(isprime(p%13), print1(p, ",")))} \\ Klaus Brockhaus, Oct 28 2009
    

Extensions

Edited by Klaus Brockhaus and R. J. Mathar, Oct 28 2009 and Oct 29 2009

A281664 Numbers k such that A000005(k) = A000005(A000217(k)).

Original entry on oeis.org

1, 2, 6, 10, 18, 22, 30, 42, 46, 58, 66, 70, 78, 82, 102, 106, 126, 130, 138, 150, 162, 166, 178, 190, 198, 210, 222, 226, 238, 250, 262, 270, 282, 306, 310, 330, 346, 358, 366, 378, 382, 418, 430, 438, 442, 462, 466, 478, 486, 490, 498, 502, 522, 546, 562
Offset: 1

Views

Author

Colin Barker, Jan 26 2017

Keywords

Comments

Numbers k such that the number of divisors of k is equal to the number of divisors of k*(k+1)/2.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local p; p:= a(n-1)+2;
          while irem(p, 4)<>3 do p:= nextprime(p) od; p-1
        end: a(1):=1:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jan 27 2017
  • Mathematica
    Select[Range@ 562, DivisorSigma[0, #] == DivisorSigma[0, PolygonalNumber@ #] &] (* Michael De Vlieger, Jan 27 2017, Version 10.4 *)
  • PARI
    select(n->numdiv(n)==numdiv(n*(n+1)/2), vector(1000, n, n))

Formula

a(n) = A045326(n) - 1. - Alois P. Heinz, Jan 27 2017
Showing 1-10 of 15 results. Next