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

A318126 a(n) is the number of pieces of the simplest continuous piecewise linear function that agrees with n mod k for all positive integer k.

Original entry on oeis.org

1, 2, 3, 4, 5, 4, 5, 6, 7, 7, 7, 6, 7, 8, 9, 10, 10, 9, 10, 11, 11, 12, 11, 10, 11, 12, 13, 13, 14, 13, 13, 14, 15, 15, 14, 13, 14, 15, 16, 16, 17, 16, 16, 17, 17, 18, 17, 16, 16, 17, 19, 19, 18, 17, 17, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 19, 20, 21, 22
Offset: 0

Views

Author

Luc Rousseau, Aug 18 2018

Keywords

Comments

For a fixed n, the list of values (n mod k) can be modeled by a continuous piecewise linear function. Its simplest form consists of choosing the least possible number of intervals with integer endpoints. By definition a(n) is this number of intervals.
It appears that a(n) is asymptotically sqrt(8n) and that a(n) <= sqrt(8n) for all n >= 1.

Examples

			With n=5, the list of values of (n mod k), i.e., {0, 1, 2, 1, 0, 5, 5, 5, ...} is modeled by:
- {0, 1, 2} = k - 1 between k=1 and k=3,
- {2, 1, 0} = 5 - k between k=3 and k=5,
- {0, 5} = 5*k - 25 between k=5 and k=6,
- {5, 5, 5, ...} = 5 between k=6 and positive infinity.
Four intervals are involved, so a(5) = 4.
		

Crossrefs

Cf. A048058 (the table of n mod k).

Programs

  • Mathematica
    a[n_] := Module[{d = Differences[(Mod[n, #] &) /@ Range[n + 2]],
       r = 1, k},
      For[k = 2, k <= Length[d], k++, If[d[[k]] != d[[k - 1]], r++]];
      r]; a /@ Range[0, 68]
  • PARI
    nxt(n,x)=my(y=floor(n/floor(n/x)));if(y==x,x+1,y)
    a(n)=my(r=1,x=1,t=n,s=-1,xx,tt,ss);while(t,xx=nxt(n,x);tt=floor(n/xx);ss=(t*x-tt*xx)/(xx-x);if(ss!=s,r++);x=xx;t=tt;s=ss);r
    for(n=0,68,print1(a(n), ", "))

A173757 Numbers k such that exactly one of k^2 + k + 1 and k^2 + k + 11 is prime.

Original entry on oeis.org

0, 4, 7, 9, 13, 14, 16, 18, 21, 23, 24, 25, 27, 28, 29, 30, 33, 34, 39, 45, 47, 50, 51, 52, 54, 56, 57, 58, 59, 60, 61, 66, 67, 68, 69, 71, 73, 77, 81, 83, 84, 85, 89, 90, 93, 94, 96, 99, 100, 103, 105, 106, 108, 110, 111, 113, 114, 117, 119, 122, 123, 124, 125, 127, 130
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 23 2010

Keywords

Comments

Numbers k such that either k^2+k+1 or k^2+k+11 is prime, but not both. - R. J. Mathar, Mar 01 2010

Examples

			0 is in the sequence because 0^2+0+1 = 1 is nonprime and 0^2+0+11 = 11 is prime; 1 is not in the sequence because 1^2+1+1 = 3 is prime and 1^2+1+11 = 13 is also prime, 10 is not in the sequence because 10^2+10+1 = 111 is nonprime and 10^2+10+11 = 121 is also nonprime; 14 is in the sequence because 14^2+14+1 = 211 is prime and 14^2+14+11 = 221 is nonprime.
		

Crossrefs

Cf. A048058.

Programs

  • Magma
    [ n: n in [0..130] | IsPrime(k+1) ne IsPrime(k+11) where k is n^2+n ]; // Klaus Brockhaus, Feb 26 2010

Extensions

Edited and extended by Klaus Brockhaus, Feb 26 2010
More terms from R. J. Mathar, Mar 01 2010

A275591 a(n) = n^2 + 9*n + 1.

Original entry on oeis.org

1, 11, 23, 37, 53, 71, 91, 113, 137, 163, 191, 221, 253, 287, 323, 361, 401, 443, 487, 533, 581, 631, 683, 737, 793, 851, 911, 973, 1037, 1103, 1171, 1241, 1313, 1387, 1463, 1541, 1621, 1703, 1787, 1873, 1961, 2051, 2143, 2237, 2333, 2431, 2531, 2633, 2737
Offset: 0

Views

Author

Miquel Cerda, Aug 02 2016

Keywords

Comments

Also, nonnegative integers m such that 4*m + 77 is a square. The negative values of m are -7, -13, -17, -19.
The product of two consecutive terms belongs to the sequence. In fact: a(k)*a(k+1) = a(k*(k+1)+9*k+1).

Crossrefs

Cf. A028569.
Subsequence of A007775.

Programs

Formula

O.g.f.: (1 + 8*x - 7*x^2)/(1 - x)^3. - Colin Barker, Aug 03 2016
E.g.f.: (1 + 10*x + x^2)*exp(x).
a(n) = a(-n-9) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Colin Barker, Aug 03 2016
a(n) = A048058(n-1) + A008592(n-1) for n>0.
a(n) = 1 + A028569(n). - Omar E. Pol, Aug 02 2016
a(n) + a(-n) = (n-1)^2 + (n+1)^2.
Sum_{i>=0} 1/a(i) = 9736/29393 + tan(sqrt(77)*Pi/2)*Pi/sqrt(77) = 1.301517...

Extensions

Edited and extended by Bruno Berselli, Aug 05 2016

A382210 Irregular triangle read by rows: T(n,k) = k^2 - k + (A003173(n) + 1)/4 with 1 <= k < (A003173(n) + 1)/4.

Original entry on oeis.org

2, 3, 5, 5, 7, 11, 17, 11, 13, 17, 23, 31, 41, 53, 67, 83, 101, 17, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257, 41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033, 1097, 1163, 1231, 1301, 1373, 1447, 1523, 1601
Offset: 4

Views

Author

Stefano Spezia, Mar 18 2025

Keywords

Examples

			The irregular triangle begins as:
   2;
   3,  5;
   5,  7, 11, 17;
  11, 13, 17, 23, 31, 41, 53, 67, 83, 101;
  17, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257;
  ...
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 225.

Crossrefs

Programs

  • Mathematica
    Heegner:={1, 2, 3, 7, 11, 19, 43, 67, 163};A003173[n_]:=Part[Heegner,n]; T[n_,k_]:=k^2-k+(A003173[n]+1)/4;Table[T[n,k],{n,4,9},{k,(A003173[n]+1)/4-1}]//Flatten
Previous Showing 11-14 of 14 results.