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!)
A112456 Least triangular number divisible by n-th prime. 3

%I #12 Aug 05 2021 16:13:46

%S 6,3,10,21,55,78,136,171,253,406,465,666,820,903,1081,1378,1711,1830,

%T 2211,2485,2628,3081,3403,3916,4656,5050,5253,5671,5886,6328,8001,

%U 8515,9316,9591,11026,11325,12246,13203,13861,14878,15931,16290,18145,18528,19306

%N Least triangular number divisible by n-th prime.

%C Essentially the same as A008837; only the first terms differ.

%F a(n) = p*(p-1)/2, for p = prime(n) and n >= 2. - _Michael S. Branicky_, Jun 03 2021

%t With[{tr=Accumulate[Range[300]]},Table[SelectFirst[tr,Divisible[#,Prime[n]]&],{n,50}]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 06 2018 *)

%o (PARI)

%o T(n) = n*(n+1)/2

%o for(n=1,100, p=prime(n); tr=1; while(T(tr)%p<>0, tr++); print1(T(tr),","))

%o (Python)

%o from sympy import prime

%o def a(n):

%o if n == 1: return 6

%o p = prime(n)

%o return p*(p-1)//2

%o print([a(n) for n in range(1, 46)]) # _Michael S. Branicky_, Jun 03 2021

%Y Cf. A000217 (triangular numbers), A008837 (p(p-1)/2 for p prime).

%K nonn

%O 1,1

%A _Rick L. Shepherd_, Sep 06 2005

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 28 15:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)