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!)
A225503 Least triangular number t such that t = prime(n)*triangular(m) for some m>0, or 0 if no such t exists. 5
6, 3, 15, 21, 66, 78, 1326, 190, 1035, 435, 465, 17205, 861, 903, 9870, 5565, 1567335, 16836, 20100, 2556, 2628, 49770, 55278, 4005, 42195, 413595, 47895, 10100265, 5995, 1437360, 32131, 8646, 1352190, 19559385, 54397665, 1642578, 12246, 52975, 501501, 134940, 336324807802305 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecture: a(n) > 0.
a(n) = (x^2-1)/8 where x is the least odd solution > 1 of the Pell-like equation x^2 - prime(n)*y^2 = 1 - prime(n). - Robert Israel, Jan 08 2015
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000 (n = 1..200 from Zak Seidov).
EXAMPLE
See A225502.
MAPLE
F:= proc(n) local p, S, x, y, z, cands, s;
p:= ithprime(n);
S:= {isolve(x^2 - p*y^2 = 1-p)};
for z from 0 do
cands:= select(s -> (subs(s, x) > 1 and subs(s, x)::odd), simplify(eval(S, _Z1=z)));
if cands <> {} then
x:= min(map(subs, cands, x));
return((x^2-1)/8)
fi
od;
end proc:
map(F, [$1..100]); # Robert Israel, Jan 08 2015
MATHEMATICA
a[n_] := Module[{p, x0, sol, x, y}, p = Prime[n]; x0 = Which[n == 1, 7, n == 2, 5, True, sol = Table[Solve[x > 1 && y > 1 && x^2 - p y^2 == 1 - p, {x, y}, Integers] /. C[1] -> c, {c, 0, 1}] // Simplify; Select[x /. Flatten[sol, 1], OddQ] // Min]; (x0^2 - 1)/8];
Array[a, 171] (* Jean-François Alcover, Apr 02 2019, after Robert Israel *)
PROG
(C)
#include <stdio.h>
#define TOP 300
typedef unsigned long long U64;
U64 isTriangular(U64 a) {
U64 sr = 1ULL<<32, s, b, t;
if (a < (sr/2)*(sr+1)) sr>>=1;
while (a < sr*(sr+1)/2) sr>>=1;
for (b = sr>>1; b; b>>=1) {
s = sr+b;
if (s&1) t = s*((s+1)/2);
else t = (s/2)*(s+1);
if (t >= s && a >= t) sr = s;
}
return (sr*(sr+1)/2 == a);
}
int main() {
U64 i, j, k, m, tm, p, pp = 1, primes[TOP];
for (primes[0]=2, i = 3; pp < TOP; i+=2) {
for (p = 1; p < pp; ++p) if (i%primes[p]==0) break;
if (p==pp) {
primes[pp++] = i;
for (j=p=primes[pp-2], m=tm=1; ; j=k, m++, tm+=m) {
if ((k = p*tm) < j) k=0;
if (isTriangular(k)) break;
}
printf("%llu, ", k);
}
}
return 0;
}
(PARI) a(n) = {p = prime(n); k = 1; while (! ((t=k*(k+1)/2) && ((t % p) == 0) && ispolygonal(t/p, 3)), k++); t; } \\ Michel Marcus, Jan 08 2015
CROSSREFS
Sequence in context: A335567 A362625 A352015 * A302350 A046879 A248267
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, May 09 2013
EXTENSIONS
a(171) from Giovanni Resta, Jun 19 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 March 29 08:00 EDT 2024. Contains 371265 sequences. (Running on oeis4.)