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

A059100 a(n) = n^2 + 2.

Original entry on oeis.org

2, 3, 6, 11, 18, 27, 38, 51, 66, 83, 102, 123, 146, 171, 198, 227, 258, 291, 326, 363, 402, 443, 486, 531, 578, 627, 678, 731, 786, 843, 902, 963, 1026, 1091, 1158, 1227, 1298, 1371, 1446, 1523, 1602, 1683, 1766, 1851, 1938, 2027, 2118, 2211, 2306, 2403, 2502, 2603
Offset: 0

Views

Author

Henry Bottomley, Feb 13 2001

Keywords

Comments

Let s(n) = Sum_{k>=1} 1/n^(2^k). Then I conjecture that the maximum element in the continued fraction for s(n) is n^2 + 2. - Benoit Cloitre, Aug 15 2002
Binomial transformation yields A081908, with A081908(0)=1 dropped. - R. J. Mathar, Oct 05 2008
1/a(n) = R(n)/r with R(n) the n-th radius of the Pappus chain of the symmetric arbelos with semicircle radii r, r1 = r/2 = r2. See the MathWorld link for Pappus chain (there are two of them, a left and a right one. In this case these two chains are congruent). - Wolfdieter Lang, Mar 01 2013
a(n) is the number of election results for an election with n+2 candidates, say C1, C2, ..., and C(n+2), and with only two voters (each casting a single vote) that have C1 and C2 receiving the same number of votes. See link below. - Dennis P. Walsh, May 08 2013
This sequence gives the set of values such that for sequences b(k+1) = a(n)*b(k) - b(k-1), with initial values b(0) = 2, b(1) = a(n), all such sequences are invariant under this transformation: b(k) = (b(j+k) + b(j-k))/b(j), except where b(j) = 0, for all integer values of j and k, including negative values. Examples are: at n=0, b(k) = 2 for all k; at n=1, b(k) = A005248; at n=2, b(k) = 2*A001541; at n=3, b(k)= A057076; at n=4, b(k) = 2*A023039. This b(k) family are also the transformation results for all related b'(k) (i.e., those with different initial values) including non-integer values. Further, these b(k) are also the bisections of the transformations of sequences of the form G(k+1) = n * G(k) + G(k-1), and those bisections are invariant for all initial values of g(0) and g(1), including non-integer values. For n = 1 this g(k) family includes Fibonacci and Lucas, where the invariant bisection is b(k) = A005248. The applicable bisection for this transformation of g(k) is for the odd values of k, and applies for all n. Also see A000032 for a related family of sequences. - Richard R. Forberg, Nov 22 2014
Also the number of maximum matchings in the n-gear graph. - Eric W. Weisstein, Dec 31 2017
Also the Wiener index of the n-dipyramidal graph. - Eric W. Weisstein, Jun 14 2018
Numbers of the form n^2+2 have no factors that are congruent to 7 (mod 8). - Gordon E. Michaels, Sep 12 2019
For n >= 1, the continued fraction expansion of sqrt(a(n)) is [n; {n, 2n}]. - Magus K. Chu, Sep 10 2022

Examples

			For n = 2, a(2) = 6 since there are 6 election results in a 4-candidate, 2-voter election that have candidates c1 and c2 tied. Letting <i,j> denote voter 1 voting for candidate i and voter 2 voting for candidate j, the six election results are <1,2>, <2,1>, <3,3>, <3,4>, <4,3>, and <4,4>. - _Dennis P. Walsh_, May 08 2013
		

Crossrefs

Apart from initial terms, same as A010000.
2nd row/column of A295707.

Programs

Formula

G.f.: (2 - 3*x + 3*x^2)/(1 - x)^3. - R. J. Mathar, Oct 05 2008
a(n) = ((n - 2)^2 + 2*(n + 1)^2)/3. - Reinhard Zumkeller, Feb 13 2009
a(n) = A000196(A156798(n) - A000290(n)). - Reinhard Zumkeller, Feb 16 2009
a(n) = 2*n + a(n-1) - 1 with a(0) = 2. - Vincenzo Librandi, Aug 07 2010
a(n+3) = (A166464(n+5) - A166464(n))/20. - Paul Curtz, Nov 07 2012
From Paul Curtz, Nov 07 2012: (Start)
a(3*n) mod 9 = 2.
a(3*n+1) = 3*A056109(n).
a(3*n+2) = 3*A056105(n+1). (End)
Sum_{n >= 1} 1/a(n) = Pi * coth(sqrt(2)*Pi) / 2^(3/2) - 1/4. - Vaclav Kotesovec, May 01 2018
From Amiram Eldar, Jan 29 2021: (Start)
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(2)*Pi*(csch(sqrt(2)*Pi)))/4.
Product_{n>=0} (1 + 1/a(n)) = sqrt(3/2)*csch(sqrt(2)*Pi)*sinh(sqrt(3)*Pi).
Product_{n>=0} (1 - 1/a(n)) = csch(sqrt(2)*Pi)*sinh(Pi)/sqrt(2). (End)
E.g.f.: exp(x)*(2 + x + x^2). - Stefano Spezia, Aug 07 2024

A144255 Semiprimes of the form k^2+1.

Original entry on oeis.org

10, 26, 65, 82, 122, 145, 226, 362, 485, 626, 785, 842, 901, 1157, 1226, 1522, 1765, 1937, 2026, 2117, 2305, 2402, 2501, 2602, 2705, 3365, 3482, 3601, 3722, 3845, 4097, 4226, 4762, 5042, 5777, 6085, 6242, 6401, 7226, 7397, 7745, 8465, 9026, 9217, 10001, 10202
Offset: 1

Views

Author

T. D. Noe, Sep 16 2008

Keywords

Comments

Iwaniec proves that there are an infinite number of semiprimes or primes of the form n^2+1. Because n^2+1 is not a square for n>0, all such semiprimes have two distinct prime factors.
Moreover, this implies that one prime factor p of n^2+1 is strictly smaller than n, and therefore also divisor of (the usually much smaller) m^2+1, where m = n % p (binary "mod" operation). - M. F. Hasler, Mar 11 2012

Crossrefs

Subsequence of A134406.

Programs

  • Magma
    IsSemiprime:= func; [s: n in [1..100] | IsSemiprime(s) where s is n^2 + 1]; // Vincenzo Librandi, Sep 22 2012
    
  • Mathematica
    Select[Table[n^2  + 1, {n, 100}], PrimeOmega[#] == 2&] (* Vincenzo Librandi, Sep 22 2012 *)
  • PARI
    select(n->bigomega(n)==2,vector(500,n,n^2+1)) \\ Zak Seidov Feb 24 2011
    
  • Python
    from sympy import primeomega
    from itertools import count, takewhile
    def aupto(limit):
        form = takewhile(lambda x: x <= limit, (k**2+1 for k in count(1)))
        return [number for number in form if primeomega(number)==2]
    print(aupto(10202)) # Michael S. Branicky, Oct 26 2021

Formula

a(n) = A085722(n)^2 + 1.
Equals { n^2+1 | A193432(n)=2 }. - M. F. Hasler, Mar 11 2012

A335963 Decimal expansion of Product_{p prime, p == 1 (mod 4)} (1 - 2/p^2).

Original entry on oeis.org

8, 9, 4, 8, 4, 1, 2, 2, 4, 5, 6, 2, 4, 8, 8, 1, 7, 0, 7, 2, 5, 6, 6, 1, 5, 0, 6, 9, 0, 8, 4, 3, 7, 3, 2, 1, 9, 8, 7, 5, 4, 7, 8, 0, 8, 9, 2, 0, 7, 1, 8, 9, 7, 2, 6, 0, 1, 7, 9, 9, 4, 2, 7, 6, 1, 6, 5, 6, 3, 8, 9, 2, 2, 1, 2, 0, 9, 1, 5, 5, 0, 2, 8, 8, 5, 9, 4, 2, 9, 1, 0, 5, 3, 9, 5, 8, 9, 1, 0, 8, 0, 0, 3, 3, 2, 2
Offset: 0

Views

Author

Amiram Eldar, Jul 01 2020

Keywords

Comments

The asymptotic density of the numbers k such that k^2+1 is squarefree (A049533) (Estermann, 1931).
The constant c in Sum_{k=0..n} phi(k^2 + 1) = A333170(n) ~ (1/4)*c*n^3 (Finch, 2018).
The constant c in Sum_{k=0..n} phi(k^2 + 1)/(k^2 + 1) = (3/4)*c*n + O(log(n)^2) (Postnikov, 1988).

Examples

			0.89484122456248817072566150690843732198754780892071...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, p. 101.
  • Steven R. Finch, Mathematical Constants II, Cambridge University Press, 2018, p. 166.
  • A. G. Postnikov, Introduction to Analytic Number Theory, Amer. Math. Soc., 1988, pp. 192-195.

Crossrefs

Programs

  • Maple
    Digits := 150;
    with(NumberTheory);
    DirichletBeta := proc(s) (Zeta(0, s, 1/4) - Zeta(0, s, 3/4))/4^s; end proc;
    alfa := proc(s) DirichletBeta(s)*Zeta(s)/((1 + 1/2^s)*Zeta(2*s)); end proc;
    beta := proc(s) (1 - 1/2^s)*Zeta(s)/DirichletBeta(s); end proc;
    pzetamod41 := proc(s, terms) 1/2*Sum(Moebius(2*j + 1)*log(alfa((2*j + 1)*s))/(2*j + 1), j = 0..terms); end proc;
    evalf(exp(-Sum(2^t*pzetamod41(2*t, 50)/t, t = 1..200))); # Vaclav Kotesovec, Jan 13 2021
  • Mathematica
    f[p_] := If[Mod[p, 4] == 1, 1 - 2/p^2, 1]; RealDigits[N[Product[f[Prime[i]], {i, 1, 10^6}], 10], 10, 8][[1]] (* for calculating only the first few terms *)
    (* -------------------------------------------------------------------------- *)
    S[m_, n_, s_] := (t = 1; sums = 0; difs = 1; While[Abs[difs] > 10^(-digits - 5) || difs == 0, difs = (MoebiusMu[t]/t) * Log[If[s*t == 1, DirichletL[m, n, s*t], Sum[Zeta[s*t, j/m]*DirichletCharacter[m, n, j]^t, {j, 1, m}]/m^(s*t)]]; sums = sums + difs; t++]; sums);
    P[m_, n_, s_] := 1/EulerPhi[m] * Sum[Conjugate[DirichletCharacter[m, r, n]] * S[m, r, s], {r, 1, EulerPhi[m]}] + Sum[If[GCD[p, m] > 1 && Mod[p, m] == n, 1/p^s, 0], {p, 1, m}];
    Z2[m_, n_, s_] := (w = 1; sumz = 0; difz = 1; While[Abs[difz] > 10^(-digits - 5), difz = 2^w * P[m, n, s*w]/w; sumz = sumz + difz; w++]; Exp[-sumz]);
    $MaxExtraPrecision = 1000; digits = 121; RealDigits[Chop[N[Z2[4, 1, 2], digits]], 10, digits-1][[1]] (* Vaclav Kotesovec, Jan 15 2021 *)
  • PARI
    f(lim,poly=1-'x-'x^2/2)=prodeulerrat(subst(poly,'x,1/'x^2))*prodeuler(p=2,lim, my(pm2=1./p^2); if(p%4==1,1.-2*pm2,1.)/subst(poly,'x,pm2)) \\ Gets 14 digits at lim=1e9; Charles R Greathouse IV, Aug 10 2022

Formula

Equals 2*A065474/A340617.

Extensions

More digits (from the paper by R. J. Mathar) added by Jon E. Schoenfield, Jan 12 2021
More digits from Vaclav Kotesovec, Jan 13 2021

A049533 Numbers k such that k^2+1 is squarefree.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80
Offset: 1

Views

Author

Keywords

Comments

Estermann proved that a(n) ~ kn with k = 1.117...; more precisely, there are cx + O(x^(2/3) log x) terms up to x, where c = 1/k = Product (1 - 2/p^2) where the product is over primes p which are 1 mod 4. Heath-Brown improves the error term to O(x^(7/12) log x). - Charles R Greathouse IV, Oct 16 2017, corrected by Amiram Eldar, Jul 08 2020
There are 89489 terms up to 10^5, 894856 terms up to 10^6, 8948417 up to 10^7, 89484102 up to 10^8, and 894841314 up to 10^9. - Charles R Greathouse IV, Nov 26 2017, corrected and extended by Amiram Eldar, Jul 08 2020

Examples

			10 is a member because 10^2 + 1 = 100 + 1 = 101 is squarefree.
Reasons why certain numbers are excluded: 7^2+1 = 2*5^2, 18^2+1 = 13*5^2, 32^2+1 = 41*5^2, 38^2+1 = 5*17^2, 41^2+1 = 2*29^2, 43^2+1 = 74*5^2, 57^2+1 = 130*5^2, 82^2+1 = 269*5^2. - Neven Juric, Oct 06 2008
		

Crossrefs

Complement of A049532.

Programs

  • Magma
    [ n: n in [1..100] | IsSquarefree(n^2+1) ]; // Vincenzo Librandi, Dec 25 2010
    
  • Mathematica
    Select[Range@ 80, SquareFreeQ[#^2 + 1] &] (* Michael De Vlieger, Aug 09 2017 *)
  • PARI
    isok(n) = issquarefree(n^2+1); \\ Michel Marcus, Feb 09 2016

Formula

Numbers k such that A059592(k) = 1. - Reinhard Zumkeller, Nov 08 2006

A124809 Numbers of the form (square + 1) that are not squarefree.

Original entry on oeis.org

50, 325, 1025, 1445, 1682, 1850, 3250, 4625, 4901, 6725, 8650, 9802, 11450, 13690, 13925, 17425, 20450, 24650, 28225, 33125, 37250, 42850, 47525, 53825, 57122, 59050, 63002, 66050, 71825, 79525, 85850, 94250, 101125, 106930, 110225, 117650
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 08 2006

Keywords

Comments

The sequence is infinite (see comment in A049532). - Emmanuel Vantieghem, Oct 25 2016

Crossrefs

Programs

Formula

a(n) = A049532(n)^2 + 1.

A335962 Numbers k such that k^2 + 1 and k^2 + 2 are both squarefree.

Original entry on oeis.org

1, 2, 3, 6, 8, 9, 10, 11, 12, 15, 16, 17, 20, 21, 25, 26, 27, 28, 29, 30, 33, 34, 35, 36, 37, 39, 42, 44, 45, 46, 47, 48, 51, 52, 53, 54, 55, 56, 60, 61, 62, 64, 65, 66, 69, 72, 73, 74, 75, 78, 79, 80, 81, 83, 84, 87, 88, 89, 90, 91, 92, 96, 97, 98, 100, 101
Offset: 1

Views

Author

Amiram Eldar, Jul 01 2020

Keywords

Comments

Dimitrov (2020) proved that this sequence is infinite and has an asymptotic density Product_{p prime > 2} (1 - ((-1/p) + (-2/p) + 2)/p^2) = 0.67187..., where (a/p) is the Legendre symbol.

Examples

			1 is a term since 1^2 + 1 = 2 and 1^1 + 2 = 3 are both squarefree.
		

Crossrefs

Subsequence of A049533.

Programs

  • Mathematica
    Select[Range[100], And @@ SquareFreeQ /@ (#^2 + {1, 2}) &]

A248742 Numbers of the form x^2+1 with at most two prime factors.

Original entry on oeis.org

2, 5, 10, 17, 26, 37, 65, 82, 101, 122, 145, 197, 226, 257, 362, 401, 485, 577, 626, 677, 785, 842, 901, 1157, 1226, 1297, 1522, 1601, 1765, 1937, 2026, 2117, 2305, 2402, 2501, 2602, 2705, 2917, 3137, 3365, 3482, 3601, 3722, 3845, 4097, 4226, 4357, 4762
Offset: 1

Views

Author

R. J. Mathar, Oct 13 2014

Keywords

Comments

Prime factors are counted with multiplicity, as in A144255.
Iwaniec shows that the sequence is infinite.

Crossrefs

Programs

Formula

A268641 Squarefree numbers k such that k^2 + 1 and k^2 - 1 are also squarefree.

Original entry on oeis.org

2, 6, 14, 22, 30, 34, 42, 58, 66, 78, 86, 94, 102, 106, 110, 114, 130, 138, 142, 158, 166, 178, 186, 194, 202, 210, 214, 222, 230, 238, 254, 258, 266, 286, 302, 310, 322, 330, 346, 354, 358, 366, 390, 394, 398, 402, 410, 430, 434, 438, 446, 454, 462, 466, 470, 498
Offset: 1

Views

Author

K. D. Bajpai, Feb 09 2016

Keywords

Comments

All the listed terms are even squarefree numbers.
Subsequence of A039956.

Examples

			a(2) = 6 = 2 * 3: 6^2 + 1 = 37 = 1 * 37; 6^2 - 1 = 35 = 5 * 7; 6, 37, 35 are all squarefree.
		

Crossrefs

Programs

  • Magma
    [n : n in [1..1000]  |  IsSquarefree(n) and IsSquarefree(n^2+1) and IsSquarefree(n^2-1) ];
  • Maple
    select(n -> andmap(issqrfree, [n, n^2+1, n^2-1]), [seq(n, n=2.. 10^3)]);
  • Mathematica
    Select[Range[1000], SquareFreeQ[#] && SquareFreeQ[#^2 + 1] && SquareFreeQ[#^2 - 1] &]
  • PARI
    for(n=2, 1000, issquarefree(n) & issquarefree(n^2 + 1) & issquarefree(n^2 - 1) & print1(n,", "))
    
Showing 1-8 of 8 results.