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.

A078371 a(n) = (2*n+5)*(2*n+1).

Original entry on oeis.org

5, 21, 45, 77, 117, 165, 221, 285, 357, 437, 525, 621, 725, 837, 957, 1085, 1221, 1365, 1517, 1677, 1845, 2021, 2205, 2397, 2597, 2805, 3021, 3245, 3477, 3717, 3965, 4221, 4485, 4757, 5037, 5325, 5621, 5925, 6237, 6557, 6885, 7221, 7565, 7917, 8277, 8645
Offset: 0

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

This is the generic form of D in the (nontrivially) solvable Pell equation x^2 - D*y^2 = +4. See A077428 and A078355.
Consider all primitive Pythagorean triples (a,b,c) with c-a=8, sequence gives values of a. (Corresponding values for b are A017113(n), while c follows A078370(n).) - Lambert Klasen (Lambert.Klasen(AT)gmx.net), Nov 19 2004
From Vincenzo Librandi, Aug 08 2010: (Start)
The identity (4*n^3 + 18*n^2 + 24*n + 9)^2 - (4*n^2 + 12*n + 5)*(2*n^2 + 6*n + 4)^2 = 1 (see Ramasamy's paper in link) can be written as A141530(n+2)^2 - a(n)*A046092(n+1)^2 = 1.
a(n)^3 + 6*a(n)^2 + 9*a(n) + 4 is a square: in fact, a(n)^3 + 6*a(n)^2 + 9*a(n) + 4 = (a(n) + 1)^2*(a(n) + 4), where a(n) + 4 = (2*n+3)^2. (End)
Products of two positive odd integers with difference 4 (i.e., 1*5, 3*7, 5*9, 7*11, 9*13, ...). - Wesley Ivan Hurt, Nov 19 2013
Starting with stage 1, the number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 675", based on the 5-celled von Neumann neighborhood. - Robert Price, May 21 2016
The continued fraction expansion of (sqrt(a(n))-1)/2 is [n; {1,2*n+1}] with periodic part of length 2: repeat {1,2*n+1}. - Ron Knott, May 11 2017
a(n) is the sum of 2*n+5 consecutive integers starting from n-1. - Bruno Berselli, Jan 16 2018
The continued fraction expansion of sqrt(a(n)) is [2n+2; {1, n, 2, n, 1, 4n+4}]. For n=0, this collapses to [2; {4}]. - Magus K. Chu, Aug 26 2022

Crossrefs

Subsequence of A077425 (D values (not a square) for which Pell x^2 - D*y^2 = +4 is solvable in positive integers).
Supersequence of A143206.

Programs

  • Magma
    [(2*n+5)*(2*n+1): n in [0..100]]; // G. C. Greubel, Sep 19 2018
  • Maple
    seq((2*n+5)*(2*n+1), n=0..48); # Emeric Deutsch, Feb 24 2005
  • Mathematica
    Table[(2 n + 5) (2 n + 1), {n, 0, 100}] (* Wesley Ivan Hurt, Nov 19 2013 *)
    LinearRecurrence[{3,-3,1},{5,21,45},50] (* Harvey P. Dale, Oct 18 2020 *)
  • PARI
    lista(nn) = {for (n=0, nn, print1((2*n+1)*(2*n+5), ", "));} \\ Michel Marcus, Nov 21 2013
    

Formula

a(n) = 8*(binomial(n+2, 2)-1)+5, hence subsequence of A004770 (5 (mod 8) numbers).
G.f.: (5 + 6*x - 3*x^2)/(1-x)^3.
a(n) = A061037(2*n+1) = (2*n+3)^2 - 4. For A061037: a(2*n+1) = (2*n+1)*(2*n+5) = (2*n+3)^2-4. - Paul Curtz, Sep 24 2008
a(n) = 8*(n+1) + a(n-1) for n > 0, a(0)=5. - Vincenzo Librandi, Aug 08 2010
From Ilya Gutkovskiy, May 22 2016: (Start)
E.g.f.: (5 + 4*x*(4 + x))*exp(x).
Sum_{n>=0} 1/a(n) = 1/3. (End)
Sum_{n>=0} (-1)^n/a(n) = 1/6. - Amiram Eldar, Oct 08 2023

Extensions

More terms from Emeric Deutsch, Feb 24 2005

A209329 Decimal expansion of the sum over the inverse products of adjacent odd primes.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Jan 19 2013

Keywords

Comments

Contains the contribution from twin primes (A209328) plus other contributions from cousin primes (A143206) not already part of twin primes, sexy primes (A210477) not already accounted for, etc.
Summing up to (and including) 12-digit primes yields 0.134426509691698261. - Hans Havermann, Mar 17 2013

Examples

			0.134426509... = 1/(3*5) + 1/(5*7) + 1/(7*11) + 1/(11*13)+ ... = Sum_{n>=2} 1/A006094(n).
		

Crossrefs

Cf. A210473 (includes 1/(2*3)). Cf. also A085548.

Programs

  • PARI
    {default(realprecision,19);s=0;q=1/3;forprime(p=1/q+1,10^9,s+=q*q=1./p);s} /* M. F. Hasler, Jan 22 2013 */

Formula

sum_{3 < p < 10^4} 1/(prevprime(p)*p) = 0.134416688[9]...
sum_{3 < p < 10^5} 1/(prevprime(p)*p) = 0.134425707...
sum_{3 < p < 10^6} 1/(prevprime(p)*p) = 0.1344264419...
sum_{3 < p < 10^7} 1/(prevprime(p)*p) = 0.13442650383...
sum_{3 < p < 10^8} 1/(prevprime(p)*p) = 0.13442650917[5]...
sum_{3 < p < 10^9} 1/(prevprime(p)*p) = 0.13442650964545...
Extrapolation of this data (using Aitken's method) indeed suggests a value of 0.134426509692, rounded to the last decimal place. Extrapolation of the ratios of the first differences (9.02e-6, 7.35e-7, 6.19e-8, 5.34e-9, 4.699e-10) yields subsequent terms (4.26e-11, 4.0e-12). - M. F. Hasler, Jan 22 2013

Extensions

More terms from R. J. Mathar, Feb 08 2013

A111192 Product of the n-th sexy prime pair.

Original entry on oeis.org

55, 91, 187, 247, 391, 667, 1147, 1591, 1927, 2491, 3127, 4087, 4891, 5767, 7387, 9991, 10807, 11227, 12091, 17947, 23707, 25591, 28891, 30967, 37627, 38407, 51067, 52891, 55687, 64507, 67591, 70747, 75067, 78391, 96091, 98587, 111547, 122491, 126727, 136891
Offset: 1

Views

Author

Shawn M Moore (sartak(AT)gmail.com), Oct 23 2005

Keywords

Comments

Semiprime of the form 4*m^2-9 = (2*m-3)*(2*m+3). - Vincenzo Librandi, Jan 26 2016

Examples

			a(2)=91 because the second sexy prime pair is (7, 13) and 7*13=91.
		

Crossrefs

Cf. A037074, A143206, A195118; intersection of A143205 and A001358.

Programs

  • Haskell
    a111192 n = a111192_list !! (n-1)
    a111192_list = f a000040_list where
       f (p:ps@(q:r:_)) | q - p == 6 = (p*q) : f ps
                        | r - p == 6 = (p*r) : f ps
                        | otherwise  = f ps
    -- Reinhard Zumkeller, Sep 13 2011
    
  • Magma
    IsSemiprime:=func; [s: n in [1..300] | IsSemiprime(s) where s is 4*n^2-9]; // Vincenzo Librandi, Jan 26 2016
  • Mathematica
    #(#+6)&/@Select[Prime[Range[100]], PrimeQ[#+6]&] (* Harvey P. Dale, Dec 17 2010 *)
    (* For checking large numbers, the following code is better. For instance, we could use the fQ function to determine that 229031718473564142083 is not in this sequence. *) fQ[n_] := Block[{fi = FactorInteger[n]}, Last@# & /@ fi == {1, 1} && Differences[ First@# & /@ fi] == {6}]; Select[ Range[125000], fQ] (* Robert G. Wilson v, Feb 08 2012 *)
    Select[Table[4 n^2 - 9, {n, 300}], PrimeOmega[#] == 2 &] (* Vincenzo Librandi, Jan 26 2016 *)

Formula

a(n) = A023201(n) * A046117(n). - Reinhard Zumkeller, Sep 13 2011

A163836 Composites whose largest prime factor is equal to the sum of all the other prime factors (with repetition).

Original entry on oeis.org

4, 9, 25, 30, 49, 70, 84, 121, 169, 286, 289, 308, 361, 440, 495, 528, 529, 594, 646, 728, 819, 841, 884, 961, 975, 1040, 1170, 1248, 1369, 1404, 1496, 1681, 1683, 1748, 1798, 1849, 1976, 2209, 2223, 2499, 2809, 2975, 3128, 3135, 3344, 3481, 3519, 3526, 3570
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 05 2009

Keywords

Comments

Sequence contains the square of every prime. - Sean A. Irvine, Oct 05 2009
Contains 4*A143206. - David A. Corneth, Apr 28 2020
Contains 2*A037074. - Bernard Schott, Apr 28 2020

Examples

			a(1) = 4 (2=2), a(2) = 9 (3=3), a(3) = 25 (5=5), a(4) = 30 (5=3+2), a(5) = 49 (7=7), a(6) = 70 (7=5+2), a(7) = 84 (7=3+2+2), a(8) = 121 (11=11), a(9) = 169 (13=13), a(10) = 286 (13=11+2), a(11) = 289(17=17), a(12) = 308 (11=7+2+2), ...
		

Crossrefs

Programs

  • Maple
    A002808 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do: end if; end proc: A006530 := proc(n) if n = 1 then 1; else numtheory[factorset](n) ; max(op(%)) ; end if; end: A001414 := proc(n) ifactors(n)[2] ; add( op(1,p)*op(2,p),p=%) ; end: A163836 := proc(n) option remember; local a,lpf; if n =1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then lpf := A006530(a) ; if 2*lpf = A001414(a) then return a; end if; end if; od: end if; end: seq(A163836(n),n=1..80) ; # R. J. Mathar, Oct 10 2009
  • Mathematica
    seqQ[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, f[[1, 2]] == 2, f[[-1, 2]] == 1 && f[[-1, 1]] == Plus @@ Times @@@ Most[f]]]; Select[Range[4000], seqQ] (* Amiram Eldar, Apr 28 2020 *)
  • Python
    from sympy import factorint
    def ok(n):
      f = factorint(n)
      return sum(f[p] for p in f) > 1 and 2*max(f) == sum(p*f[p] for p in f)
    print(list(filter(ok, range(3571)))) # Michael S. Branicky, Apr 09 2021

Extensions

Corrected and extended by Sean A. Irvine and R. J. Mathar, Oct 05 2009

A195106 Numbers with largest and smallest prime factors differing by 4.

Original entry on oeis.org

21, 63, 77, 105, 147, 189, 221, 315, 437, 441, 525, 539, 567, 735, 847, 945, 1029, 1323, 1517, 1575, 1701, 2021, 2205, 2625, 2835, 2873, 3087, 3675, 3757, 3773, 3969, 4725, 4757, 5103, 5145, 5929, 6557, 6615, 7203, 7875, 8303, 8505, 9261, 9317, 9797, 10051
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 13 2011

Keywords

Examples

			a(10) = 441 = 3^2 * 7^2.
a(11) = 525 = 3 * 5^2 * 7.
a(12) = 539 = 7^2 * 11.
		

Crossrefs

A143203 is a subsequence.

Programs

  • Haskell
    a195106 n = a195106_list !! (n-1)
    a195106_list = filter (\x -> a006530 x - a020639 x == 4) [1,3..]
  • Mathematica
    pf4Q[n_]:=Module[{pfs=Transpose[FactorInteger[n]][[1]]}, Max[pfs]- Min[pfs]==4]; Select[Range[11000],pf4Q] (* Harvey P. Dale, Sep 24 2011 *)

Formula

Sum_{n>=1} 1/a(n) = 1/48 + Sum_{n>=1} 1/A143203(n) = 1/48 + Sum_{n>=1} 1/((A023200(n)+1)^2-4) = 0.130715767205... . - Amiram Eldar, Oct 26 2024

A163634 a(n) = (p*(p+4)+1)/2 where (p,p+4) are the n-th cousin prime pair.

Original entry on oeis.org

11, 39, 111, 219, 759, 1011, 2379, 3279, 4899, 5511, 6159, 8319, 13611, 19011, 25311, 26679, 38919, 47739, 49611, 61599, 72579, 79599, 97239, 105339, 108111, 119559, 125499, 189111, 208011, 227811, 274539, 288039, 297219, 340311, 365511, 370659
Offset: 1

Views

Author

Vincenzo Librandi, Aug 02 2009

Keywords

Examples

			a(1) =  (3* 7 + 1)/2 =  11;
a(2) =  (7*11 + 1)/2 =  39;
a(3) = (13*17 + 1)/2 = 111.
		

Crossrefs

Programs

  • Magma
    [(p*(p+4)+1)/2: p in PrimesUpTo(1000)| IsPrime(p+4)]; // Vincenzo Librandi, May 17 2014
  • Mathematica
    (fQ[n_]:=Block[{fi=FactorInteger@n}, Last@#&/@fi=={1, 1}&&Differences[First@#&/@fi]=={4}]; Select[Range@8000000, fQ] + 1)/2 (* Vincenzo Librandi Jan 02 2018 *)
    Join[{11},(1+Times@@#)/2&/@Select[Partition[Prime[Range[250]],2,1],#[[2]]- #[[1]]==4&]] (* Harvey P. Dale, Apr 04 2022 *)

Formula

a(n) = (A143206(n) + 1)/2.

Extensions

Entries checked by R. J. Mathar, Aug 07 2009

A164098 Numbers of the form m * (k_1^2 + k_2^2 + ... + k_m^2).

Original entry on oeis.org

1, 4, 9, 10, 16, 18, 20, 25, 26, 27, 28, 33, 34, 36, 40, 42, 48, 49, 50, 51, 52, 54, 55, 57, 58, 60, 63, 64, 65, 66, 68, 70, 72, 74, 76, 78, 80, 81, 82, 84, 85, 87, 88, 90, 91, 92, 95, 99, 100, 102, 104, 105, 106, 108, 110, 112, 114, 115, 116, 120, 121, 122, 123, 124, 125
Offset: 1

Views

Author

Jonas Wallgren, Aug 10 2009, Aug 17 2009

Keywords

Comments

From Franklin T. Adams-Watters, Aug 29 2009: (Start)
The k_i must all be positive integers.
Note that every integer > 33 is the sum of 5 positive squares, and for n > 5, every integer > n+13 is the sum of n positive squares. (End)
The complement of this sequence includes: A000040, A037074, A143206, 2 * A002145, and 3 * A094712. - Robert Israel, Jan 27 2025

Examples

			34 = 2*(4^2 + 1^2), 42 = 3*(3^2 + 2^2 + 1^2), thus 34 and 42 are in the sequence.
		

Crossrefs

Programs

  • Maple
    g:= proc(y,m)
      # can we write y as sum of m positive squares?
       option remember;
       local x;
       if y < m then return false fi;
       if m = 1 then return issqr(y) fi;
       if issqr(y-m+1) then return true fi;
       for x from 1 while x^2 + m-1 < y do
         if procname(y-x^2,m-1) then return true fi
       od;
       false
    end proc:
    filter:= proc(n)
      ormap(t -> g(n/t, t), numtheory:-divisors(n))
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jan 26 2025
  • PARI
    issumsqs(n,k) = if(n<=0||k<=0,return(k==0&&n==0)); forstep(j=sqrtint(n),max(sqrtint(n\k),1),-1,if(issumsqs(n-j^2,k-1),return(1)));0
    isa(n)=local(ds);ds=divisors(n);for(k=1,(#ds+1)\2,if(issumsqs(n\ds[k],ds[k]),return(1)));0
    for(n=1,200,if(isa(n),print1(n","))) \\ Franklin T. Adams-Watters, Aug 29 2009

Extensions

More terms from Franklin T. Adams-Watters, Aug 29 2009

A340231 Numbers of the form m^2-4 and also equal to some k concatenated with k+1.

Original entry on oeis.org

12, 45, 2021, 3132, 1456414565, 3823938240, 6991969920, 120395120396, 426436426437, 902596902597, 74780207478021, 90902209090221, 66713320846671332085, 81142640598114264060, 84822272598482227260, 99002509969900250997, 22443387868362244338786837, 24905771529642490577152965
Offset: 1

Views

Author

Bernard Schott, Jan 01 2021

Keywords

Comments

All the terms have an even number of digits, but there is no term with 6, 8, 16, 18, 22, 24, ... digits.
The values of m are A115439, because a(n) = m^2-4 and a(n) = k|k+1 <==> a(n)+4 = m^2 and a(n)+4 = k|k+5 <==> m^2 = k|k+5, where | denotes concatenation.
a(3) = 2021 = 43*47 is A143206(6), the product of a cousin prime pair.
The next such term is A115439(1062)^2 - 4. - David A. Corneth, Jan 02 2021

Examples

			a(1) = 12 = 4^2-4 = 2*6.
a(4) = 3132 = 56^2-4 = 54*58.
		

Crossrefs

Intersection of A001704 and A028347.

Programs

  • Mathematica
    Select[Table[n 10^IntegerLength[n]+n+1,{n,10^6}],IntegerQ[Sqrt[#+4]]&] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, Dec 27 2022 *)
  • Python
    def agen():
      m = 4
      while True:
        tstr = str(m*m-4)
        k = int(tstr[:len(tstr)//2])
        if tstr == str(k) + str(k+1):
          yield(int(tstr))
        m += 1
    for an in agen(): print(an, end=", ") # Michael S. Branicky, Jan 02 2021

Extensions

a(13)-a(16) from Michael S. Branicky, Jan 02 2021
a(17)-a(18) from David A. Corneth, Jan 02 2021
Showing 1-8 of 8 results.