login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A232608 Triangular numbers t such that distances from t to three nearest squares are three triangular numbers. 2
1, 10, 15, 253, 325, 11026, 237016, 8439886, 1119946128 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Triangular numbers in A232501.
LINKS
PROG
(C99)
#include <stdio.h>
#include <math.h>
typedef unsigned long long U64;
int isTriang(U64 x) {
x+=x;
U64 r = sqrt(x);
return (r*(r+1)==x);
}
int main() {
for (U64 n=0, i=0; i < (1ULL<<32); ++i) {
U64 s, d, d1, d2, d3;
s = sqrt(n+=i);
d1 = n - s*s;
if (!isTriang(d1)) continue;
d2 = (s+1)*(s+1) - n;
if (!isTriang(d2)) continue;
d3 = (s+2)*(s+2) - n;
if (s) {
d = n - (s-1)*(s-1);
if (d < d3) d3 = d;
}
if (isTriang(d3)) printf("%llu, ", n);
}
}
(Haskell)
a232608 n = a232608_list !! (n-1)
a232608_list = filter f $ tail a000217_list where
f x = all ((== 1) . a010054) $ init $ sort $
map (abs . (x -) . (^ 2) . (+ (a000196 x))) [-1..2]
-- Reinhard Zumkeller, Mar 16 2014
CROSSREFS
Sequence in context: A278349 A114703 A134515 * A175335 A167788 A341012
KEYWORD
nonn,hard,more
AUTHOR
Alex Ratushnyak, Feb 23 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 19:05 EDT 2024. Contains 371751 sequences. (Running on oeis4.)