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.

User: James R. Buddenhagen

James R. Buddenhagen's wiki page.

James R. Buddenhagen has authored 120 sequences. Here are the ten most recent ones:

A336272 Length of longest side of a primitive square Heron triangle, i.e., a triangle with relatively prime integer sides and area the square of a positive integer.

Original entry on oeis.org

17, 26, 120, 370, 392, 567, 680, 697, 847, 1066, 1089, 1183, 1233, 1299, 1371, 1448, 1904, 2009, 2169, 2176, 2281, 2307, 2535, 2600, 2619, 2785, 2845, 2993, 3150, 3370, 3825, 3944, 3983, 4035, 4095, 4290, 4706, 4760, 4879, 4905, 5655, 5811, 5835, 6137, 6375, 6570, 6936, 7202, 7913, 7995
Offset: 1

Author

James R. Buddenhagen, Jul 15 2020

Keywords

Comments

The triangle [a(23)=2535, 2329, 544] with gcd(2329, 544) = 17 is the first square Heron triangle for which the 3 sides [i, j, k] are not pairwise coprime, i.e., max(gcd(i,j), gcd(i,k), gcd(j,k)) > 1, but gcd(i,j,k) = 1. Are there more square Heron triangles with this property? - Hugo Pfoertner, Jul 18 2020
There are other square Heron triangles with this property, e.g. [a(31)=3825, 2704, 1921] with gcd(1921, 3825) = 17; [a(??)=41460721, 38639097, 17536520] with gcd(38639097, 17536520) = 41; [a(??)=153915025, 139641489, 25224736] with gcd(25224736, 153915025) = 17; and [a(??)=4325561361, 3459908000, 1430190961] with gcd(3459908000, 1430190961) = 73. - James R. Buddenhagen, Jul 20 2020
Terms are given with multiplicity, e.g. if there are two primitive square Heron triangles with equal longest sides, that longest side is listed as a term of the sequence twice (this is very rare). - James R. Buddenhagen, Jul 21 2020

Examples

			17 is in the sequence because the triangle with sides [17, 10, 9] has longest side 17 and area 6^2, the square of a positive integer; 26 is in the sequence because the triangle with sides [26, 25, 3] has longest side 26 and has area 6^2, the square of a positive integer.
Triangles with sides [a, b, c] corresponding to the first 8 terms of this sequence are:  [17, 10, 9], [26, 25, 3], [120, 113, 17], [370, 357, 41], [392, 353, 255], [567, 424, 305], [680, 441, 337], [697, 657, 104].
		

Programs

  • Maple
    # find all square Heron triangles whose longest side is between small and big
    small:=1: big:=700:
    A336272:=[]:triangles:=[]:
    areasq16:=(a+b+c)*(a+b-c)*(a-b+c)*(-a+b+c):
    # a>=b>=c
    for a from small to big do:
      for b from ceil((a+1)/2) to a do:
        for c from a-b+1 to b do:
          if issqr(areasq16) and issqr(sqrt(areasq16)) and igcd(a,b,c)=1 then
            A336272:=[op(A336272),a]:
            triangles:=[op(triangles),[a,b,c]]:
          end if:
        od:
      od:
    od: A336272;triangles;
  • PARI
    for(a=1,1200,for(b=ceil((a+1)/2),a,for(c=a-b+1,b,if(gcd([a,b,c])==1,if(ispower((a+b+c)*(a+b-c)*(a-b+c)*(b+c-a),4),print1(a,", ")))))) \\ Hugo Pfoertner, Jul 18 2020

Extensions

a(42)-a(50) from Hugo Pfoertner, Jul 18 2020

A334294 Numbers k such that 70*k^2 + 70*k - 1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 17, 20, 22, 23, 24, 26, 27, 29, 30, 31, 33, 34, 36, 37, 39, 40, 41, 43, 44, 45, 46, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 70, 71, 74, 76, 77, 78, 79, 80, 81, 82, 87, 88, 90, 93, 96, 97, 100
Offset: 1

Author

James R. Buddenhagen, Apr 21 2020

Keywords

Comments

Among quadratic polynomials in k of the form a*k^2 + a*k - 1 the value a=70 gives the most primes for any a in the range 1<=a<=300, at least up to k=40000. Here a and k are positive integers. Other "good" values of a are a=250, a=99, and a=19.

Examples

			For k=1, 70*k^2 + 70*k - 1 = 70*1^2 + 70*1 - 1 = 139, which is prime, so 1 is in the sequence.
		

Programs

  • Maple
    a:=proc(n) if isprime(70*n^2+70*n-1) then n else NULL end if end proc;
    seq(a(n),n=1..100);
  • Mathematica
    Select[Range@ 100, PrimeQ[70 #^2 + 70 # - 1] &] (* Michael De Vlieger, May 26 2020 *)

A330563 Primes in A330562.

Original entry on oeis.org

101, 103, 109, 401, 601, 701, 1009, 1021, 1033, 1051, 1063, 1201, 1303, 1801, 2011, 2017, 2081, 2801, 3001, 3061, 3301, 4001, 4021, 4201, 4801, 5011, 5021, 5051, 5081, 5101, 5501, 5801, 6301
Offset: 1

Author

James R. Buddenhagen, Dec 31 2019

Keywords

Crossrefs

Cf. A330562.

Programs

  • Maple
    filter:= proc(k) local L;
      L:= convert(convert(k,base,10),set);
      andmap(d -> member(k mod d, L), L minus {0}) and isprime(k)
    end proc:
    select(filter, [seq(i,i=101..10000,2)]); # Robert Israel, Dec 23 2024

A300473 Numbers k with the property that k^2 + 21k + 1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 73, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 89, 91, 97, 100
Offset: 1

Author

James R. Buddenhagen, Mar 06 2018

Keywords

Comments

The quadratic polynomial p(k) = k^2 + 21*k + 1 is not a prime-generating polynomial in the sense of Eric Weisstein's World of Mathematics (see link) because p(0) is not prime.
However p(k) is prime for the first 17 positive integral values of k and among polynomials of the form k^2 + j*k + 1, the present polynomial (j = 21) generates more primes than any polynomial of that form for any positive integral j < 231, at least for positive integers, k, in the range 0 < k < 10^6.

Examples

			17 is in the sequence because 17^2 + 21 * 17 + 1 = 647 is prime.
18 is not in the sequence because 18^2 + 21 * 18 + 1 = 703 = 19 * 37.
		

Programs

  • Maple
    select(k-> isprime(k^2+21*k+1), [$1..100])
  • Mathematica
    Select[Range[100], PrimeQ[#^2 + 21# + 1] &] (* Alonso del Arte, Mar 06 2018 *)
  • PARI
    isok(k) = isprime(k^2+21*k+1); \\ Altug Alkan, Mar 07 2018

A273049 Palindromic primes with exactly three nonzero digits.

Original entry on oeis.org

131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 10301, 10501, 10601, 30103, 30203, 30403, 30703, 30803, 70207, 70507, 70607, 90709, 1003001, 1008001, 3001003, 3002003, 3007003, 9002009, 100030001, 100050001, 100060001, 300020003
Offset: 1

Author

James R. Buddenhagen, May 13 2016

Keywords

Crossrefs

Subsequence of A002385.

Programs

  • Magma
    [p: p in PrimesUpTo(100000000) | #[d: d in t[1..#t]| d ne 0] eq 3 and p eq Seqint(Reverse(t)) where t is Intseq(p)]; // Bruno Berselli, May 16 2016
  • Mathematica
    Reap[ Do[ If[PrimeQ[p = e*(1+10^(2*n)) + m*10^n], Sow@p], {n, 99}, {e, {1, 3, 7, 9}}, {m, 9}]][[2, 1]] (* Giovanni Resta, May 14 2016 *)

A264783 Primes that do not divide 2^m - 2293 for any positive integer m.

Original entry on oeis.org

2, 31, 41, 43, 71, 73, 89, 103, 113, 127, 151, 157, 223, 229, 233, 241, 251, 257, 263, 277, 311, 313, 331, 337, 353, 359, 397, 409, 431, 449, 487, 499, 521, 571, 577, 599, 607, 631, 641, 643, 647, 673, 683, 691, 719, 727, 739, 769, 809, 811, 839, 857, 863, 881, 911, 919, 929, 937, 953, 971, 983, 1009, 1013, 1021, 1031, 1033, 1049, 1051, 1063, 1069, 1087, 1093, 1097, 1103, 1151, 1153, 1163, 1181, 1193, 1201, 1217, 1223, 1231, 1249, 1279, 1289, 1297, 1321, 1327, 1367, 1399, 1409, 1423, 1429, 1433, 1439, 1447
Offset: 1

Author

James R. Buddenhagen, Nov 24 2015

Keywords

Programs

  • Maple
    select(t -> isprime(t) and numtheory:-mlog(2293,2,t) = FAIL, [2,seq(t,t=3..2000,2)]); # Robert Israel, Nov 25 2015

A263718 n such that (1+2*7^n)/3 is prime.

Original entry on oeis.org

1, 3, 4, 15, 24, 58, 168, 234, 324, 375, 3327, 5788, 8344, 15039, 59116, 62620
Offset: 1

Author

James R. Buddenhagen, Oct 24 2015

Keywords

Comments

The numbers corresponding to a(11)-a(16) are only (extra-strong BPSW) probable primes. - Charles R Greathouse IV, Nov 10 2015

Programs

Extensions

a(11)-a(14) from Charles R Greathouse IV, Nov 06 2015
a(15)-a(16) from Charles R Greathouse IV, Nov 09 2015

A231101 a(n) = 3*a(n-3) + a(n-2), a(0)=3, a(1)=0, a(2)=2.

Original entry on oeis.org

3, 0, 2, 9, 2, 15, 29, 21, 74, 108, 137, 330, 461, 741, 1451, 2124, 3674, 6477, 10046, 17499, 29477, 47637, 81974, 136068, 224885, 381990, 633089, 1056645, 1779059, 2955912, 4948994
Offset: 0

Author

James R. Buddenhagen, Nov 05 2013

Keywords

Comments

a(n) = r^n+s^n+t^n, where r,s,t are the roots of x^3-x-3.
If p is prime then p divides a(p).
Both this and the Perrin sequence are linear recurrences with a(n) depending on a(n-3) and a(n-2) but not on a(n-1), with the same initial conditions; both are sums of powers of roots of a cubic: Perrin: a(n) = r^n+s^n+t^n with r,s,t roots of x^3-x-1 this seq: a(n) = r^n+s^n+t^n with r,s,t roots of x^3-x-3. See crossrefs.

Crossrefs

Programs

  • Maple
    a:=proc(n) option remember:
    if n=0 then 3 elif n=1 then 0 elif n=2 then 2 else 3*a(n-3)+a(n-2) end if end proc:
    bign:=30:
    seq(a(n),n=0..bign);
  • Mathematica
    CoefficientList[Series[(x^2 - 3)/(3*x^3 + x^2 - 1), {x, 0, 50}], x] (* Wesley Ivan Hurt, May 26 2024 *)

Formula

a(n) = 3*a(n-3)+a(n-2), a(0)=3, a(1)=0, a(2)=2.
a(n) = r^n+s^n+t^n, where r,s,t are the roots of x^3-x-3.
G.f.: (x^2-3)/(3*x^3+x^2-1).

A206351 a(n) = 7*a(n-1) - a(n-2) - 4 with a(1)=1, a(2)=3.

Original entry on oeis.org

1, 3, 16, 105, 715, 4896, 33553, 229971, 1576240, 10803705, 74049691, 507544128, 3478759201, 23843770275, 163427632720, 1120149658761, 7677619978603, 52623190191456, 360684711361585, 2472169789339635
Offset: 1

Author

James R. Buddenhagen, Feb 06 2012

Keywords

Comments

A Pell sequence related to Heronian triangles (rational triangles), see A206334. The connection is this: consider the problem of finding triangles with area a positive integer n, and with sides (a, b, n) where a, b are rational. Note that n is both the area and one side. For many values of n this is not possible, and the sequence of such numbers n is quite erratic (see A206334). Nonetheless, each term in this sequence is such a value of n. For example, for n = 105 you can take the other two sides, a and b, to be 10817/104, and 233/104 and the area will equal n, i.e., 105.

Examples

			G.f. = x + 3*x^2 + 16*x^3 + 105*x^4 + 715*x^5 + 4896*x^6 + 33553*x^7 + ... - _Michael Somos_, Jun 26 2018
		

Crossrefs

Subsequence of A206334.

Programs

  • Haskell
    a206351 n = a206351_list !! (n-1)
    a206351_list = 1 : 3 : map (subtract 4)
                   (zipWith (-) (map (* 7) (tail a206351_list)) a206351_list)
    -- Reinhard Zumkeller, Feb 08 2012
    
  • Magma
    [Fibonacci(2*n)*Fibonacci(2*n-3): n in [1..30]]; // G. C. Greubel, Aug 12 2018
  • Maple
    genZ := proc(n)
    local start;
    option remember;
        start := [1, 3];
        if n < 3 then start[n]
        else 7*genZ(n - 1) - genZ(n - 2) - 4
        end if
    end proc:
    seq(genZ(n),n=1..20);
  • Mathematica
    LinearRecurrence[{8, -8, 1}, {1, 3, 16}, 50] (* Charles R Greathouse IV, Feb 07 2012 *)
    RecurrenceTable[{a[1] == 1, a[2] == 3, a[n] == 7 a[n - 1] - a[n - 2] - 4}, a, {n, 20}] (* Bruno Berselli, Feb 07 2012 *)
    a[ n_] := Fibonacci[2 n] Fibonacci[2 n - 3]; (* Michael Somos, Jun 26 2018 *)
    nxt[{a_,b_}]:={b,7b-a-4}; NestList[nxt,{1,3},20][[;;,1]] (* Harvey P. Dale, Aug 29 2024 *)
  • PARI
    Vec((1-5*x)/(1-8*x+8*x^2-x^3)+O(x^99)) \\ Charles R Greathouse IV, Feb 07 2012
    
  • PARI
    {a(n) = fibonacci(2*n) * fibonacci(2*n - 3)}; /* Michael Somos, Jun 26 2018 */
    

Formula

From Bruno Berselli, Feb 07 2012: (Start)
G.f.: x*(1-5*x)/(1-8*x+8*x^2-x^3).
a(n) = A081018(n-1) + 1. (End)
a(n) = -A003482(-n) = Fibonacci(2*n)*Fibonacci(2*n-3). - Michael Somos, Jun 26 2018
a(n) = A089508(n-1) + 2 for n>1. - Bruno Berselli, Jun 20 2019 [Formula found by Umberto Cerruti]
Product_{n>=2} (1 - 1/a(n)) = 1/phi (A094214) (Davlianidze, 2020). - Amiram Eldar, Nov 30 2021
a(n) = (Fibonacci(2*n-2) + 1/Lucas(2*n-2))*(Fibonacci(2*n-1) + 1/Lucas(2*n-1)). - Peter Bala, Sep 03 2022

A206334 Numbers n such that there is a triangle with area n, side n, and the other two sides rational.

Original entry on oeis.org

3, 5, 7, 10, 12, 15, 16, 18, 19, 23, 25, 26, 27, 28, 29, 30, 33, 34, 36, 38, 39, 40, 41, 42, 43, 44, 46, 47, 51, 52, 55, 57, 58, 59, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 80, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 95, 96, 97, 103, 104, 105, 106, 107, 109, 115, 119, 122, 123, 124, 125, 126
Offset: 1

Author

James R. Buddenhagen, Feb 06 2012

Keywords

Comments

n>3 is in the sequence just in case the elliptic curve y^2 = 4*x^4 + (n^2+8)*x^2 + 4 has positive rank. Note that (0,2) is on that curve.
n is in the sequence just in case there are positive rational numbers x,y such that x*y>1 and x - 1/x + y - 1/y = n.
The triangle whose sides are [(4*k^6+8*k^5+8*k^4+4*k^3+2*k^2+2*k+1)/((k+1)*k*(2*k^2+2*k+1)), (4*k^6+16*k^5+28*k^4+28*k^3+18*k^2+6*k+1)/((k+1)*k*(2*k^2+2*k+1)), 4*k^2+4*k+4] has area equal to its third side. Hence, starting with the second term, A112087 is a subsequence of the present sequence.
The triangle whose sides are [(k^6+2*k^4+k^2+1)/(k*(k^2+1)), (k^4+3*k^2+1)/(k*(k^2+1)), (k^2+2)*k] has area equal to its third side. Hence, starting with the first positive term, A054602 is a subsequence of the present sequence. [This subsequence found by Dragan K, see second link, below.]
The triangle whose sides are [(k^8+6*k^6+13*k^4+13*k^2+4)/(k*(k^2+2)*(k^2+1)), (k^6+3*k^4+5*k^2+4)/(k*(k^2+2)*(k^2+1)), k*(k^2+4)] has area equal to its third side. Hence A155965 is a subsequence of the present sequence.

Examples

			5 is in the sequence because the triangle with sides (37/6, 13/6, 5) has area 5, one side 5, and the other two sides rational.
		

Crossrefs

Cf. A112087, A054602, A155965, and A206351 (subsequences, see comments).