A007587
12-gonal (or dodecagonal) pyramidal numbers: a(n) = n*(n+1)*(10*n-7)/6.
Original entry on oeis.org
0, 1, 13, 46, 110, 215, 371, 588, 876, 1245, 1705, 2266, 2938, 3731, 4655, 5720, 6936, 8313, 9861, 11590, 13510, 15631, 17963, 20516, 23300, 26325, 29601, 33138, 36946, 41035, 45415, 50096, 55088, 60401, 66045, 72030, 78366, 85063, 92131, 99580, 107420, 115661
Offset: 0
- A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 194.
- E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 93.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
See similar sequences listed in
A237616.
-
List([0..45], n-> n*(n+1)*(10*n-7)/6); # G. C. Greubel, Aug 30 2019
-
[ n eq 1 select 0 else Self(n-1)+(n-1)*(5*n-9): n in [1..45] ]; // Klaus Brockhaus, Nov 20 2008
-
A007587:=n->n*(n+1)*(10*n-7)/6: seq(A007587(n), n=0..50); # Wesley Ivan Hurt, Oct 23 2014
-
CoefficientList[Series[x(1+9x)/(1-x)^4, {x,0,45}], x] (* Vincenzo Librandi, Jun 20 2013 *)
Table[n(n+1)(10n-7)/6,{n,0,50}] (* Harvey P. Dale, Nov 13 2013 *)
-
a(n)=if(n,([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,4,-6,4]^n*[0;1;13;46])[1,1],0) \\ Charles R Greathouse IV, Oct 07 2015
-
vector(45, n, n*(n-1)*(10*n-17)/6) \\ G. C. Greubel, Aug 30 2019
-
[n*(n+1)*(10*n-7)/6 for n in (0..45)] # G. C. Greubel, Aug 30 2019
A011774
Nonprimes k that divide sigma(k) + phi(k).
Original entry on oeis.org
1, 312, 560, 588, 1400, 23760, 59400, 85632, 147492, 153720, 556160, 569328, 1590816, 2013216, 3343776, 4563000, 4695456, 9745728, 12558912, 22013952, 23336172, 30002960, 45326160, 52021242, 75007400, 113315400, 137617728, 153587720, 402831360, 699117024
Offset: 1
a(26) = 113315400: sigma = 426535200, phi = 26726400, quotient = 4.
- Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004. See Section B42, p. 151.
- Zhang Ming-Zhi, typescript submitted to Unsolved Problems section of Monthly, 96-01-10.
-
Do[If[Mod[DivisorSigma[1, n]+EulerPhi[n], n]==0, Print[n]], {n, 1, 2*10^7}]
Do[ If[ ! PrimeQ[n] && Mod[ DivisorSigma[1, n] + EulerPhi[n], n] == 0, Print[n] ], {n, 1, 10^8} ]
-
sp(n)=my(f=factor(n));n*prod(i=1, #f[,1], 1-1/f[i,1]) + prod(i=1, #f[,1], (f[i,1]^(f[i,2]+1)-1)/(f[i,1]-1))
p=2;forprime(q=3, 1e6, for(n=p+1, q-1, if(sp(n)%n==0, print1(n", ")));p=q) \\ Charles R Greathouse IV, Mar 19 2012
A051487
Numbers k such that phi(k) = phi(k - phi(k)).
Original entry on oeis.org
2, 6, 12, 24, 48, 96, 150, 192, 300, 384, 600, 726, 750, 768, 1200, 1452, 1500, 1536, 2310, 2400, 2904, 3000, 3072, 3174, 3750, 4620, 4800, 5046, 5808, 5874, 6000, 6090, 6144, 6348, 6930, 7500, 7986, 9240, 9600, 10086, 10092, 10374, 11550, 11616, 11748, 12000
Offset: 1
- Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B42, p. 150.
-
a051487 n = a051487_list !! (n-1)
a051487_list = [x | x <- [2..], let t = a000010 x, t == a000010 (x - t)]
-- Reinhard Zumkeller, Jun 03 2013
-
Select[Range[11700], EulerPhi[ # ] == EulerPhi[ # - EulerPhi[ # ]] &] (* Farideh Firoozbakht, Jun 19 2005 *)
-
isA051487(n) = eulerphi(n) == eulerphi(n - eulerphi(n)) \\ Michael B. Porter, Dec 07 2009
A004401
Least number of edges in graph containing all trees on n nodes.
Original entry on oeis.org
0, 1, 2, 4, 6, 8, 11, 13, 16, 18
Offset: 1
- R. L. Graham, personal communication.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- F. R. K. Chung and R. L. Graham, On graphs which contain all small trees, J. Combinatorial Theory Ser. B 24 (1978), no. 1, 14--23. MR0505812 (58 #21808a)
- F. R. K. Chung, R. L. Graham and N. Pippenger, On graphs which contain all small trees. II. Combinatorics (Proc. Fifth Hungarian Colloq., Keszthely, 1976), Vol. I, pp. 213-223. Colloq. Math. Soc. Janos Bolyai, 18. North-Holland, Amsterdam, 1978.
- Manfred Scheucher, Sage Program
- Manfred Scheucher, Graph on 10 vertices and 18 edges containing all trees on 10 vertices.
- Paul Tabatabai, Exhaustive search proving a(9) = 16. (Sage script)
- Paul Tabatabai, Graph on 9 vertices and 16 edges containing all trees on 9 vertices.
- Eric Weisstein's World of Mathematics, Fully Forested Graph.
- Index entries for sequences related to trees
Cf.
A380740 (numbers of smallest fully forested graphs).
A046936
Same rule as Aitken triangle (A011971) except a(0,0)=0, a(1,0)=1.
Original entry on oeis.org
0, 1, 1, 1, 2, 3, 3, 4, 6, 9, 9, 12, 16, 22, 31, 31, 40, 52, 68, 90, 121, 121, 152, 192, 244, 312, 402, 523, 523, 644, 796, 988, 1232, 1544, 1946, 2469, 2469, 2992, 3636, 4432, 5420, 6652, 8196, 10142, 12611, 12611, 15080, 18072, 21708, 26140
Offset: 0
Triangle starts:
0,
1, 1,
1, 2, 3,
3, 4, 6, 9,
9, 12, 16, 22, 31,
31, 40, 52, 68, 90, 121,
121, 152, 192, 244, 312, 402, 523,
523, 644, 796, 988, 1232, 1544, 1946, 2469,
2469, 2992, 3636, 4432, 5420, 6652, 8196, 10142, 12611,
12611, 15080, ...
-
a046936 n k = a046936_tabl !! n !! k
a046936_row n = a046936_tabl !! n
a046936_tabl = [0] : iterate (\row -> scanl (+) (last row) row) [1,1]
-- Reinhard Zumkeller, Jan 01 2014
-
a[0, 0] = 0; a[1, 0] = 1; a[n_, 0] := a[n, 0] = a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 15 2013 *)
-
from itertools import accumulate
def A046936(): # Compare function Gould_diag in A121207.
yield [0]
accu = [1, 1]
while True:
yield accu
accu = list(accumulate([accu[-1]] + accu))
g = A046936()
[next(g) for in range(9)] # _Peter Luschny, Apr 25 2016
A060984
a(1) = 1; a(n+1) = a(n) + (largest square <= a(n)).
Original entry on oeis.org
1, 2, 3, 4, 8, 12, 21, 37, 73, 137, 258, 514, 998, 1959, 3895, 7739, 15308, 30437, 60713, 121229, 242333, 484397, 967422, 1933711, 3865811, 7730967, 15459367, 30912128, 61814609, 123625653, 247235577, 494448306, 988888002, 1977738918, 3955408759, 7910812423
Offset: 1
- E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982.
- R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E26.
-
a060984 n = a060984_list !! (n-1)
a060984_list = iterate (\x -> x + a048760 x) 1
-- Reinhard Zumkeller, Dec 24 2013
-
a[1] = 1; a[n_] := a[n] = a[n - 1] + Floor[ Sqrt[ a[n - 1] ] ]^2; Table[ a[n], {n, 1, 40} ]
RecurrenceTable[{a[1]==1,a[n]==a[n-1]+Floor[Sqrt[a[n-1]]]^2},a,{n,40}] (* Harvey P. Dale, Nov 19 2011 *)
NestList[#+Floor[Sqrt[#]]^2&,1,40] (* Harvey P. Dale, Jan 22 2013 *)
-
{ default(realprecision, 100); for (n=1, 500, if (n==1, a=1, a+=floor(sqrt(a))^2); write("b060984.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 15 2009
-
from sympy import integer_nthroot
A060984_list = [1]
for i in range(10**3): A060984_list.append(A060984_list[-1]+integer_nthroot(A060984_list[-1],2)[0]**2) # Chai Wah Wu, Apr 02 2021
-
from math import isqrt
from itertools import accumulate
def f(an, _): return an + isqrt(an)**2
print(list(accumulate([1]*36, f))) # Michael S. Branicky, Apr 02 2021
A060985
a(1) = 1; a(n+1) = a(n) + (largest triangular number <= a(n)).
Original entry on oeis.org
1, 2, 3, 6, 12, 22, 43, 79, 157, 310, 610, 1205, 2381, 4727, 9383, 18699, 37227, 74355, 148660, 296900, 593735, 1187240, 2373810, 4746741, 9491481, 18981027, 37956907, 75910735, 151820416, 303627016, 607253419, 1214497244, 2428978214, 4857918665
Offset: 1
- E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982.
-
a060985 n = a060985_list !! (n-1)
a060985_list = iterate a061885 1 -- Reinhard Zumkeller, Feb 03 2012
-
a[1] = 1; a[n_] := a[n] = Block[ {k = 1}, While[ k*(k + 1)/2 <= a[n - 1], k++ ]; a[n - 1] + k*(k - 1)/2]; Table[ a[n], {n, 1, 40} ]
f[n_]:=Module[{c=Floor[(Sqrt[1+8n]-1)/2]},(c(c+1))/2]; NestList[#+f[#]&, 1, 40] (* Harvey P. Dale, Jun 19 2011 *)
-
{ default(realprecision, 1000); for (n=1, 1000, if (n<2, a=1, k=(sqrt(1 + 8*a) - 1)\2; a+=k*(k + 1)/2 ); write("b060985.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 16 2009
A063980
Pillai primes: primes p such that there exists an integer m such that m! + 1 == 0 (mod p) and p != 1 (mod m).
Original entry on oeis.org
23, 29, 59, 61, 67, 71, 79, 83, 109, 137, 139, 149, 193, 227, 233, 239, 251, 257, 269, 271, 277, 293, 307, 311, 317, 359, 379, 383, 389, 397, 401, 419, 431, 449, 461, 463, 467, 479, 499, 503, 521, 557, 563, 569, 571, 577, 593, 599, 601, 607
Offset: 1
-
ok[p_] := (r = False; Do[If[Mod[m! + 1, p] == 0 && Mod[p, m] != 1, r = True; Break[]], {m, 2, p}]; r); Select[Prime /@ Range[111], ok] (* Jean-François Alcover, Apr 22 2011 *)
nn=1000; fact=1+Rest[FoldList[Times,1,Range[nn]]]; t={}; Do[p=Prime[i]; m=2; While[mT. D. Noe, Apr 22 2011 *)
-
is(p)=my(t=Mod(5040,p)); for(m=8, p-2, t*=m; if(t==-1 && p%m!=1, return(isprime(p)))); 0 \\ Charles R Greathouse IV, Feb 10 2013
A122036
Odd abundant numbers (A005231) which are not in A136446, i.e., not sum of some of their proper divisors > 1.
Original entry on oeis.org
a(1) = 351351 = 3^3 * 7 * 11 * 13^2 is the sum of all its 47 proper divisors (including 1) except 7 and 11, but it is not possible to get the same sum without using the trivial divisor 1: The sum of all proper divisors *larger than 1* yields 351351 + 7 + 11 - 1 = 351351 + 17, and it is not possible to get 17 as sum of a subset of {3, 7, 9, 11, 13, 21, ...}. Thus, 351351 is not in A136446, and therefore in this sequence. - _M. F. Hasler_, Jul 16 2016, edited Mar 15 2021
-
is_A122036(n)={n>351350 && !is_A005835(n,n=divisors(n)[2..-2]) && n && vecsum(n)>=n[1]*n[#n] && n[1]>2} \\ (Checking for abundant & odd after is_A005835() rather than before, to make it faster when operating on candidates known to satisfy these conditions.) Updated for current PARI syntax by M. F. Hasler, Jul 16 2016, further edits Jan 31 2020
forstep(n=1,10^7,2, is_A122036(n) && print1(n","))
A169677
The first of a pair of sequences A and B with property that all the differences |a_i - b_j| are distinct - for precise definition see Comments lines.
Original entry on oeis.org
0, 1, 7, 18, 35, 59, 88, 125, 178, 233, 285, 344, 352, 442, 557, 675, 796, 797, 957, 1011, 1220, 1411, 1564, 1579, 1888, 2120, 2152, 2503, 2829, 2953, 3393, 3464, 3593, 3724, 4237, 4956, 5310, 5388, 5968, 6478, 6756, 7344, 7698, 8004, 8182
Offset: 1
-
# Maple program from Alois P. Heinz:
ab:=proc() false end: ab(0):=true:
a:= proc(n) option remember;
local ok,i,k,s;
if n=1 then 0
else b(n-1);
for k from a(n-1)+1 do
ok:=true;
for i from 1 to n-1 do
if ab(abs(k-b(i))) then ok:= false; break fi
od;
if ok then s:={};
for i from 1 to n-1 do
s:= s union {abs(k-b(i))};
od
fi;
if ok and nops(s)=n-1 then break fi
od;
for i from 1 to n-1 do
ab(abs(k-b(i))):=true
od;
k
fi
end;
b:= proc(n) option remember;
local ok,i,k,s;
if n=1 then 0
else a(n);
for k from b(n-1)+1 do
ok:=true;
for i from 1 to n do
if ab(abs(k-a(i))) then ok:= false; break fi
od;
if ok then s:={};
for i from 1 to n do
s:= s union {abs(k-a(i))};
od
fi;
if ok and nops(s)=n then break fi
od;
for i from 1 to n do
ab(abs(k-a(i))):=true
od;
k
fi
end;
seq(a(n), n=1..80);
seq(b(n), n=1..80);
-
ClearAll[ab, a, b]; ab[] = False; ab[0] = True; a[n] := a[n] = Module[{ ok, i, k, s}, If[ n == 1 , 0, b[n-1]; For[ k = a[n-1] + 1 , True, k++, ok = True; For[ i = 1 , i <= n-1, i++, If[ ab[Abs[k - b[i]]] , ok = False; Break[] ]]; If[ ok , s = {}; For[ i=1 , i <= n-1 , i++, s = s ~Union~ {Abs[k - b[i]]};]]; If[ ok && (Length[s] == n-1) , Break[] ]]; For[ i=1 , i <= n-1 , i++, ab[Abs[k - b[i]]] = True]; k]]; b[n_] := b[n] = Module[{ ok, i, k, s}, If[ n == 1 , 0, a[n]; For[ k = b[n-1] + 1 , True, k++, ok = True; For[ i=1 , i <= n, i++, If[ ab[Abs[k - a[i]]] , ok = False; Break[] ]]; If[ ok , s = {}; For[ i=1 , i <= n , i++, s = s ~Union~ {Abs[k - a[i]]};]]; If[ ok && Length[s] == n , Break[] ]]; For[ i=1 , i <= n, i++, ab[Abs[k - a[i]]] := True]; k]]; Table[a[n], {n, 1, 45}] (* Jean-François Alcover, Aug 13 2012, translated from Alois P. Heinz's Maple program *)
Comments