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!)
A225884 Triangular numbers whose binary and decimal reversals are also triangular numbers. 0
0, 1, 3, 6, 120, 153, 300 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
A subsequence of A061455.
a(8), if it exists, is > triangular(10^11) > 5*10^21. - Lars Blomberg, Jan 11 2016
LINKS
EXAMPLE
BinaryReverse(120) = 15, DecimalReverse(120) = 21. Because 120, 15 and 21 are triangular numbers, 120 is in the sequence.
PROG
(C)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int isTriangular(unsigned long long a) {
unsigned long long sr = sqrt(a*2);
return (sr*(sr+1) == a*2);
}
int main() {
unsigned long long n, tn, t, r;
for (n = tn = 0; tn < (1ULL<<63); tn += ++n) {
for (r=0, t=tn; t; t>>=1) r = r*2 + (t&1);
if (isTriangular(r)==0) continue;
for (r=0, t=tn; t; t/=10) r = r*10 + (t%10);
if (isTriangular(r)==0) continue;
printf("%llu, ", tn);
}
return 0;
}
CROSSREFS
Sequence in context: A157536 A046488 A074880 * A115647 A019437 A365505
KEYWORD
nonn,base,more
AUTHOR
Alex Ratushnyak, May 24 2013
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)