login
Triangle T(n, k) = prime(n)^k - 2^(2*k-3) with T(n, 1) = prime(n), read by rows.
1

%I #10 Mar 03 2021 06:12:10

%S 2,3,7,5,23,117,7,47,335,2369,11,119,1323,14609,160923,13,167,2189,

%T 28529,371165,4826297,17,287,4905,83489,1419729,24137057,410336625,19,

%U 359,6851,130289,2475971,47045369,893869691,16983554849,23,527,12159,279809,6436215,148035377,3404823399,78310977089,1801152628695

%N Triangle T(n, k) = prime(n)^k - 2^(2*k-3) with T(n, 1) = prime(n), read by rows.

%C Row sums are: {2, 10, 145, 2758, 176985, 5228360, 435982109, 17927083398, 1883023193293, 435732491457588, ...}

%H G. C. Greubel, <a href="/A153488/b153488.txt">Rows n = 1..50 of the triangle, flattened</a>

%F T(n, k) = prime(n)^k - 2^(2*k - 3) with T(n, 1) = prime(n).

%e Triangle begins as:

%e 2;

%e 3, 7;

%e 5, 23, 117;

%e 7, 47, 335, 2369;

%e 11, 119, 1323, 14609, 160923;

%e 13, 167, 2189, 28529, 371165, 4826297;

%e 17, 287, 4905, 83489, 1419729, 24137057, 410336625;

%e 19, 359, 6851, 130289, 2475971, 47045369, 893869691, 16983554849;

%p A153488:= (n, k) -> `if`(k=1, ithprime(n), ithprime(n)^k - 2^(2*k-3));

%p seq(seq(A153488(n, k), k = 1..n), n = 1..12); # _G. C. Greubel_, Mar 02 2021

%t T[n_, k_]:= T[n,k]= If[k==1, Prime[n], Prime[n]^k -2^(2*k-3)];

%t Table[T[n, k], {n,10}, {k,n}]//Flatten (* modified by _G. C. Greubel_, Mar 02 2021 *)

%o (Sage)

%o def A153488(n,k): return nth_prime(n)^k - 2^(2*k-3)*(1- kronecker_delta(k,1))

%o flatten([[A153488(n,k) for k in (1..n)] for n in (1..12)]) # _G. C. Greubel_, Mar 02 2021

%o (Magma)

%o A153488:= func< n,k | k eq 1 select NthPrime(n) else NthPrime(n)^k - 2^(2*k-3) >;

%o [A153488(n,k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Mar 02 2021

%K nonn,tabl,easy,less

%O 1,1

%A _Roger L. Bagula_, Dec 27 2008

%E Edited by _G. C. Greubel_, Mar 02 2021