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

A155707 Numbers expressible as a^2 + k b^2 with nonzero integers a,b, for k=2, k=3, k=5 and k=7.

Original entry on oeis.org

144, 576, 1009, 1129, 1201, 1296, 1801, 1849, 2304, 2521, 2689, 2881, 3049, 3361, 3529, 3600, 3889, 4036, 4201, 4356, 4489, 4516, 4561, 4729, 4804, 5184, 5209, 5569, 5881, 5929, 6841, 7009, 7056, 7204, 7396, 7561, 7681, 8089, 8521, 8689, 8761, 8929
Offset: 1

Views

Author

M. F. Hasler, Feb 10 2009

Keywords

Comments

Subsequence of A155708.

Crossrefs

Programs

  • Maple
    filter:= proc(x) local k,S;
       if numtheory:-quadres(x,3*5*7)<> 1 then return false fi;
       for k in [2,3,5,7] do
         S:= [isolve(x = a^2 + k*b^2)];
         if andmap(t -> subs(t,a*b) = 0, S) then return false fi;
       od;
       true
    end proc;
    select(filter, [$1..10000]); # Robert Israel, May 14 2025
  • PARI
    isA155707(n,/* optional 2nd arg allows us to get other sequences */c=[7, 5, 3, 2]) = { for(i=1, #c, for(b=1, sqrtint((n-1)\c[i]), issquare(n-c[i]*b^2) & next(2)); return); 1}
    for(n=1,9999, isA155707(n) & print1(n","))

A155715 Least number expressible as a^2 + k b^2 with positive integers a,b, for each k=1,...,n.

Original entry on oeis.org

2, 17, 73, 73, 241, 241, 1009, 1009, 1009, 1009, 7561, 7561, 21961, 32356, 32356, 32356, 44641, 44641, 349924, 349924, 349924, 349924, 1399696, 1399696, 1399696, 3027249, 3027249, 3027249, 4349601, 4349601, 18567396, 18567396, 18567396
Offset: 1

Views

Author

M. F. Hasler, Jan 27 2009

Keywords

Comments

Sequence A028372 considers primes with this property, but allowing for nonzero a,b (which obviously is irrelevant for n>2). Up to n=13, the terms of the present sequence are prime without imposing it explicitely and thus coincide with A028372 except for n=2.
a(n) > 10^9 for n >= 47. [From Donovan Johnson, Sep 29 2009]

Examples

			a(1) = 2 = 1^2 + 1^2 is the least number of the sequence A000404 (sum of positive squares). a(2) = 17 = 1^2 + 4^2 = 3^2 + 2*2^2 is the least number in sequence A000404 to be in sequence A154777 (a^2+2b^2)as well. a(3) = 73 = 3^2 + 8^2 = 1^2 + 2*6^2 = 5^2 + 3*4^2 is the least number in the intersection of sequences A000404, A154777 and A092572 (a^2+3b^2).
		

Crossrefs

Programs

  • PARI
    k=1; for( n=1,10^9, forstep( c=k,1,-1, for( b=1,sqrtint((n-1)\c), issquare(n-c*b^2) & next(2));next(2)); print1(n",");k++;n--)

Extensions

a(23)-a(46) and b-file from Donovan Johnson, Sep 29 2009

A155708 Numbers expressible as a^2 + k*b^2 with nonzero integers a,b, for k=2, k=3 and k=5.

Original entry on oeis.org

36, 129, 144, 201, 241, 324, 409, 441, 489, 516, 576, 601, 769, 804, 849, 900, 921, 964, 1009, 1129, 1161, 1201, 1249, 1296, 1321, 1489, 1521, 1569, 1609, 1636, 1641, 1764, 1801, 1809, 1849, 1929, 1956, 2064, 2089, 2161, 2169, 2281, 2304, 2361, 2404, 2521
Offset: 1

Views

Author

M. F. Hasler, Feb 10 2009

Keywords

Crossrefs

Programs

  • Maple
    N:= 10000: # to get all terms <= N
    S[2]:= {}: S[3]:= {}: S[5]:= {}:
    for a from 1 to floor(sqrt(N)) do
      for k in [2,3,5] do
        S[k]:= S[k] union {seq(a^2 + k*b^2, b = 1 .. floor(sqrt((N-a^2)/k)))}
      od
    od:
    R:= S[2] intersect S[3] intersect S[5]:
    sort(convert(R,list)); # Robert Israel, Jul 11 2018
  • PARI
    isA155708(n, /* optional 2nd arg allows us to get other sequences */c=[5, 3, 2]) = { for(i=1, #c, for(b=1, sqrtint((n-1)\c[i]), issquare(n-c[i]*b^2) & next(2)); return); 1}
    for(n=1,9999, isA155708(n) & print1(n","))

A155714 Least number expressible as a^2 + p b^2 with positive integers a,b, for each prime p <= prime(n) = A000040(n).

Original entry on oeis.org

3, 12, 36, 144, 144, 4356, 4356, 4356, 7056, 17424, 176400, 2547216, 2547216, 6290064, 6780816, 6780816, 6780816, 6780816, 93315600, 93315600, 271986064, 271986064, 271986064, 271986064, 271986064, 308213136, 308213136, 308213136
Offset: 1

Views

Author

M. F. Hasler, Feb 10 2009

Keywords

Comments

a(n) > 10^9 for n >= 33. [From Donovan Johnson, Sep 29 2009]

Crossrefs

Programs

  • PARI
    A155714(k,n=1) = { local(p); until( !n++, p=prime(k); until( !p=precprime(p-1), for( b=1, sqrtint((n-1)\p), issquare(n-p*b^2) & next(2)); next(2)); break);n}
    t=1; for(k=1,30, print1(t=A155714(k,t),","))

Extensions

a(12)-a(32) and b-file from Donovan Johnson, Sep 29 2009
Showing 1-4 of 4 results.