This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A246042 Numbers n such that there is both a square and a triangular number strictly between n^3 and n^3+n. 1
 15774, 67880, 101340, 482434, 91710898, 268436480, 877362668, 4832460192 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Is the sequence infinite? a(9) > 10^10. - Hiroaki Yamanouchi, Sep 03 2014 a(9) > 10^12. - Jon E. Schoenfield, Dec 23 2014 Under certain assumptions, a heuristic argument can be made that the sequence is infinite. Given a value of n, let I_n be the interval consisting of the n-1 integers lying strictly between n^3 and n^3+n. The density of squares in the vicinity of a large number C is 1/(2*sqrt(C)), so if we assume that we may treat the event that I_n includes a square as a random event, its probability of occurrence should be about P_S = (n-1)/(2*sqrt(n^3)), which approaches 1/(2*sqrt(n)) for large n. Similarly, the density of triangular numbers in the vicinity of a large number C is 1/sqrt(2*C), so if we assume that we may treat the event that I_n includes a triangular number as a random event, its probability of occurrence should be about P_T = (n-1)/sqrt(2*n^3), which approaches 1/sqrt(2*n) for large n. If we further assume that these two events can be modeled as occurring independently of each other, then the probability that I_n will include both a square and a triangular number approaches P = P_S * P_T = sqrt(1/8)/n. Since sum_{n=1..inf} sqrt(1/8)/n diverges, the sequence should have an infinite number of terms. (The expected number of D-digit terms would approach log(10)/sqrt(8) = 0.814... as D increases; as it turns out, the average number of D-digit terms for D in the interval [1,10] is 8/10 = 0.8.) - Jon E. Schoenfield, Oct 09 2014 For a simple algorithm that uses only integer arithmetic, see the Magma program link. - Jon E. Schoenfield, Oct 09 2014 LINKS Jon E. Schoenfield, Magma program PROG (C) #include #include typedef unsigned long long U64; U64 isqrt(U64 a) {     U64 sr = 1ULL<<31;     while (a>=1;     U64 b = sr>>1;     while (b) {         U64 s = sr + b;         if (a>=s*s)  sr = s;         b>>=1;     }     return sr; } int main() {     U64 tn, t, n, cu;     for (t = n = 0; n < 2642246; ++n) {         for (cu = n*n*n; tn <= cu; ++t)             tn += t;         if (tn < cu+n && isqrt(cu) != isqrt(cu+n-1))             printf("%llu, ", n);     } } (PARI) isok(n) = {st = 0; ss = 0; for (i=n^3+1, n^3+n-1, if (issquare(i), ss++); if (ispolygonal(i, 3), st++)); (st == 1) && (ss == 1); } \\ Michel Marcus, Aug 24 2014 CROSSREFS Cf. A000217, A000290, A002378. Sequence in context: A183966 A187031 A233642 * A235755 A235530 A116493 Adjacent sequences:  A246039 A246040 A246041 * A246043 A246044 A246045 KEYWORD nonn,hard,more AUTHOR Alex Ratushnyak, Aug 23 2014 EXTENSIONS a(5)-a(8) from Hiroaki Yamanouchi, Sep 03 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 21 12:20 EST 2019. Contains 329370 sequences. (Running on oeis4.)