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.

Previous Showing 11-12 of 12 results.

A357303 Records in the numbers of representations of k^2 as x^2 - x*y + y^2, x > 2*y >= 0, corresponding to the numbers of grid points with squared radius A357302(n)^2 in an angular sector 0 <= phi < Pi/6 of the triangular lattice.

Original entry on oeis.org

1, 2, 3, 5, 8, 14, 23, 41, 68, 122, 203, 365, 608, 851, 1094, 1823, 2552, 3281, 5468, 7655, 9842, 16403, 22964, 29525, 49208, 68891, 82013, 88574, 114818, 147623, 206672, 246038, 265721
Offset: 1

Views

Author

Hugo Pfoertner, Sep 25 2022

Keywords

Comments

The total number of possible representations of A357302(n)^2 = x^2 + x*y + y^2 with integers x,y is 12*a(n) - 6.

Examples

			See A357302.
		

Crossrefs

A246360 seems to be a subsequence.
Cf. A087503.

Programs

  • Mathematica
    records[n_] := Module[{ri = n, m = 0, rcs = {}, len}, len = Length[ri];
       While[len > 0, If[First[ri] > m, m = First[ri]; AppendTo[rcs, m]];
        ri = Rest[ri]; len--]; rcs]; (* after Harvey P. Dale in A336679 *)
    records[Table[
      Length[FindInstance[
        x^2 - x*y + y^2 == k^2 && x > 2*y && y >= 0, {x, y}, Integers,
        1000]], {k, 0, 2000}]]

A372782 Least number m for which there exists some positive k < m where the sum of the integers from k + 1 to m inclusive is an n-th power > 1.

Original entry on oeis.org

2, 4, 7, 13, 22, 40, 67, 121, 202, 364, 607, 1093, 1822, 3280, 5467, 9841, 16402, 29524, 49207, 88573, 147622, 265720, 442867, 797161, 1328602, 2391484, 3985807, 7174453, 11957422, 21523360, 35872267, 64570081, 107616802, 193710244, 322850407, 581130733, 968551222, 1743392200
Offset: 1

Views

Author

Jean-Marc Rebert, May 14 2024

Keywords

Comments

With triangular sum T(i) = i*(i+1)/2 = Sum_{j=1..i} i, the aim is T(m) - T(k) = b^n for some b. T(m) - T(k) = (m+k+1)*(m-k)/2 so if m-k is odd then use m-k = b^x to eliminate k in the other factor (m+k+1)/2 = b^(n-x), so that m = b^(n-x) + (b^x - 1)/2. If instead m+k+1 is odd then the resulting expression is the same. This form is an integer and minimized at b=3 and x = ceiling(n/2). - Kevin Ryde, May 18 2024

Examples

			a(2) = 4 because the sum of all integers from 3 + 1 to 4 inclusive is 4 = 2^2, a square.
a(3) = 7 as we have 2 + 3 + 4 + 5 + 6 + 7 = 27 = 3^3, i.e., m = 7 and k = 1. - _David A. Corneth_, May 15 2024
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 3, -3}, {2, 4, 7}, 50] (* Paolo Xausa, Jun 09 2024 *)
  • PARI
    isok(m, n) = my(s = m*(m+1)/2); for (k=1, m-1, s -= k; if (ispower(s, n), return(k)););
    a(n) = my(m=1); while (! isok(m, n), m++); m; \\ Michel Marcus, May 16 2024
    
  • PARI
    a(n) = {
    	my(res, c, l, u);
    	res = 2^n; c = 8*3^n;
    	l = (sqrt(c) - 1)\2; u = res;
    	for(i = l, u,
    		if(issquare(4*(i + 1)*i + 1 - c),
    			return(i);
    		)
    	);
    	return(2^n)
    } \\ David A. Corneth, May 16 2024

Formula

a(n) = A087503(n-1) + 1.
a(n) = 3*a(n-2) + 1.
G.f.: x*(2 + 2*x - 3*x^2)/((1 - x)*(1 - 3*x^2)). - Stefano Spezia, May 18 2024

Extensions

More terms from David A. Corneth, May 16 2024
Previous Showing 11-12 of 12 results.