Commit 7837a0cd by Michael Wagner

### added 150 OEIS dump for Frederik

parent 495ee85e
 _John Cannon_(MAGMA).mDec 23 2006 D:=SmallGroupDatabase(); [ NumberOfSmallGroups(D, n) : n in [1..1000] ]; // _John Cannon_, Dec 23 2006 _Muniru A Asiru_(GAP).gapOct 15 2017 A000001 := Concatenation([0], List([1..500], n -> NumberSmallGroups(n))); # _Muniru A Asiru_, Oct 15 2017 \ No newline at end of file
 unknown(PARI).gpunknown my(a=[1,2,2]); for(n=3,80, for(i=1,a[n],a=concat(a,2-n%2))); a unknown(PARI).gpunknown {a(n) = local(an=[1, 2, 2], m=3); if( n<1, 0, while( #an < n, an = concat( an, vector(an[m], i, 2-m%2)); m++); an[n])}; _John Tromp_(Haskell).hsApr 09 2011 a = 1:2: drop 2 (concat . zipWith replicate a . cycle \$ [1,2]) -- _John Tromp_, Apr 09 2011 _David Eppstein_(Python).pyOct 15 2016 # For explanation see link. def Kolakoski(): x = y = -1 while True: yield [2,1][x&1] f = y &~ (y+1) x ^= f y = (y+1) | (f & (x>>1)) K = Kolakoski() print([next(K) for _ in range(100)]) # _David Eppstein_, Oct 15 2016 \ No newline at end of file
 unknown(MAGMA).munknown O1 := MaximalOrder(QuadraticField(D)); _,f := IsSquare(D div Discriminant(O1)); ClassNumber(sub<O1|f>); _Michael Somos_(PARI).gpJul 16 1999 {a(n) = qfbclassno(-4*n)}; /* _Michael Somos_, Jul 16 1999 */ \ No newline at end of file
 unknown(MAGMA).munknown [ 0 : n in [0..100]]; unknown(PARI).gpunknown vector(100,n,0) unknown(R).runknown rep(0,100) _Reinhard Zumkeller_(Haskell).hsMay 07 2012 a000004 = const 0 a000004_list = repeat 0 -- _Reinhard Zumkeller_, May 07 2012 \ No newline at end of file
 _Michael Somos_(PARI).gpApr 27 2003 {a(n) = if( n==0, 0, numdiv(n))}; /* _Michael Somos_, Apr 27 2003 */ _Michael Somos_(PARI).gpApr 27 2003 {a(n) = n=abs(n); if( n<1, 0, direuler( p=2, n, 1 / (1 - X)^2)[n])}; /* _Michael Somos_, Apr 27 2003 */ unknown(PARI).gpunknown {a(n)=polcoeff(sum(m=1, n+1, sumdiv(m, d, (-log(1-x^(m/d) +x*O(x^n) ))^d/d!)), n)} \\ _Paul D. Hanna_, Aug 21 2014 unknown(MAGMA).munknown [ NumberOfDivisors(n) : n in [1..100] ]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006 _Zerinvary Lajos_(MuPAD).MNBMay 13 2008 numlib::tau (n)\$ n=1..90 // _Zerinvary Lajos_, May 13 2008 _Zerinvary Lajos_(Sage).sageJun 04 2009 [sigma(n, 0) for n in range(1, 105)] # _Zerinvary Lajos_, Jun 04 2009 _James Spahlinger_(Haskell).hsOct 07 2012 divisors 1 = [1] divisors n = (1:filter ((==0) . rem n) [2..n `div` 2]) ++ [n] a = length . divisors -- _James Spahlinger_, Oct 07 2012 _Reinhard Zumkeller_(Haskell).hsJul 12 2013 a000005 = product . map (+ 1) . a124010_row -- _Reinhard Zumkeller_, Jul 12 2013 _Stefano Spezia_(Python).pyNov 05 2018 from sympy import divisor_count for n in range(1, 20): print(divisor_count(n), end=', ') # _Stefano Spezia_, Nov 05 2018 _Muniru A Asiru_(GAP).gapMar 05 2019 List([1..150],n->Tau(n)); # _Muniru A Asiru_, Mar 05 2019 \ No newline at end of file
 unknown(PARI).gpunknown (a(n)=sqrtint(prime(n))); vector(100,n,a(n)) \\ Edited by _M. F. Hasler_, Oct 19 2018 _Charles R Greathouse IV_(PARI).gpApr 26 2012 apply(sqrtint,primes(100)) \\ _Charles R Greathouse IV_, Apr 26 2012 unknown(PARI).gpunknown apply( A000006=n->sqrtint(prime(n)), [1..100]) \\ _M. F. Hasler_, Oct 19 2018 _Reinhard Zumkeller_(Haskell).hsMar 24 2012 a000006 = a000196 . a000040 -- _Reinhard Zumkeller_, Mar 24 2012 _Albert Lahat_(Python).pyJun 25 2020 from sympy import sieve A000006 = lambda n: int(sieve[n]**.5) print([A000006(n) for n in range(1,100+1)]) # _Albert Lahat_, Jun 25 2020 \ No newline at end of file
 unknown(PARI).gpunknown {a(n) = !n}; unknown(MAGMA).munknown [1] cat [0:n in [1..100]]; // Sergei Haller, Dec 21 2006 _Reinhard Zumkeller_(Haskell).hsMay 07 2012 a000007 = (0 ^) a000007_list = 1 : repeat 0 -- _Reinhard Zumkeller_, May 07 2012, Mar 27 2012 \ No newline at end of file
 _Michael Somos_(PARI).gpApr 01 2003 {a(n) = if( n<-17, -a(-18-n), if( n<0, 0, polcoeff( 1 / ((1 - x) * (1 - x^2) * (1 - x^5) * (1 - x^10)) + x * O(x^n), n)))}; /* _Michael Somos_, Apr 01 2003 */ _Joerg Arndt_(PARI).gpOct 02 2013 Vec( 1/((1-x)*(1-x^2)*(1-x^5)*(1-x^10)) + O(x^66) ) \\ _Joerg Arndt_, Oct 02 2013 _Michael Somos_(PARI).gpMar 06 2018 {a(n) = my(r = (n-1)%10 + 1); (n^3 + 27*n^2 + (191 + 3*[4, 13, 0, 5, 8, 9, 8, 5, 0, 13][r])*n + 25)\600 + 1}; /* _Michael Somos_, Mar 06 2018 */ _Tani Akinari_(Maxima).lispJun 21 2013 a(n):=floor(((n+17)*(2*n^2+20*n+81)+15*(n+1)*(-1)^n+120*((floor(n/5)+1)*((1+(-1)^mod(n,5))/2-floor(((mod(n,5))^2)/8))))/1200); /* _Tani Akinari_, Jun 21 2013 */ _Reinhard Zumkeller_(Haskell).hsDec 15 2013 a000008 = p [1,2,5,10] where p _ 0 = 1 p [] _ = 0 p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m -- _Reinhard Zumkeller_, Dec 15 2013 unknown(MAGMA).munknown [#RestrictedPartitions(n,{1,2,5,10}):n in [0..60]]; // _Marius A. Burtea_, May 07 2019 \ No newline at end of file
 _Michael Somos_(PARI).gpNov 17 1999 {a(n) = if( n<0, 0, polcoeff( prod( k=1, n, 1 + x^k, 1 + x * O(x^n)), n))}; /* _Michael Somos_, Nov 17 1999 */ unknown(PARI).gpunknown {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A), n))}; _Michael Somos_(PARI).gpAug 13 2017 {a(n) = my(c); forpart(p=n, if( n<1 || p[1]<2, c++; for(i=1, #p-1, if( p[i+1] > p[i]+1, c--; break)))); c}; /* _Michael Somos_, Aug 13 2017 */ _Altug Alkan_(PARI).gpMar 20 2018 lista(nn) = {q='q+O('q^nn); Vec(eta(q^2)/eta(q))} \\ _Altug Alkan_, Mar 20 2018 unknown(MAGMA).munknown Coefficients(&*[1+x^m:m in [1..100]])[1..100] where x is PolynomialRing(Integers()).1; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006 _Reinhard Zumkeller_(Haskell).hsSep 09 2015 import Data.MemoCombinators (memo2, integral) a000009 n = a000009_list !! n a000009_list = map (pM 1) [0..] where pM = memo2 integral integral p p _ 0 = 1 p k m | m < k = 0 | otherwise = pM (k + 1) (m - k) + pM (k + 1) m -- _Reinhard Zumkeller_, Sep 09 2015, Nov 05 2013 _Emanuele Munarini_(Maxima).lispFeb 24 2014 num_distinct_partitions(60,list); /* _Emanuele Munarini_, Feb 24 2014 */ _Vladimir Kruchinin_(Maxima).lispSep 07 2014 h(n):=if oddp(n)=true then 1 else 0; S(n,m):=if n=0 then 1 else if n<m then 0 else if n=m then h(n) else sum(h(k)*S(n-k,k),k,m,n/2)+h(n); makelist(S(n,1),n,0,27); /* _Vladimir Kruchinin_, Sep 07 2014 */ _Peter Luschny_(SageMath).sageNov 11 2020 # uses[EulerTransform from A166861] a = BinaryRecurrenceSequence(0, 1) b = EulerTransform(a) print([b(n) for n in range(56)]) # _Peter Luschny_, Nov 11 2020 \ No newline at end of file
 unknown(Axiom).unknownunknown [eulerPhi(n) for n in 1..100] unknown(MAGMA).munknown [ EulerPhi(n) : n in [1..100] ]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006 _Michael Somos_(PARI).gpFeb 05 2011 {a(n) = if( n==0, 0, eulerphi(n))}; /* _Michael Somos_, Feb 05 2011 */ unknown(Sage).sageunknown # euler_phi is a standard function in Sage. def A000010(n): return euler_phi(n) def A000010_list(n): return [ euler_phi(i) for i in range(1,n+1)] # Jaap Spies, Jan 07 2007 unknown(PARI).gpunknown { for (n=1, 100000, write("b000010.txt", n, " ", eulerphi(n))); } \\ _Harry J. Smith_, Apr 26 2009 _Zerinvary Lajos_(Sage).sageJun 06 2009 [euler_phi(n) for n in range(1, 70)] # _Zerinvary Lajos_, Jun 06 2009 _Emanuele Munarini_(Maxima).lispMar 26 2011 makelist(totient(n),n,0,1000); /* _Emanuele Munarini_, Mar 26 2011 */ unknown(Haskell).hsunknown a n = length (filter (==1) (map (gcd n) [1..n])) -- _Allan C. Wechsler_, Dec 29 2014 _Indranil Ghosh_(Python).pyMar 17 2017 from sympy.ntheory import totient print([totient(i) for i in range(1, 70)]) # _Indranil Ghosh_, Mar 17 2017 \ No newline at end of file
 _Michael Somos_(PARI).gpJun 03 2002 {a(n) = if( n<1, n==0, 2^(n\2) / 2 + sumdiv(n, k, eulerphi(2*k) * 2^(n/k)) / (4*n))}; /* _Michael Somos_, Jun 03 2002 */ \ No newline at end of file
 unknown(MAGMA).munknown [1 : n in [0..100]]; unknown(PARI).gpunknown {a(n) = 1}; _Reinhard Zumkeller_(Haskell).hsMay 07 2012 a000012 = const 1 a000012_list = repeat 1 -- _Reinhard Zumkeller_, May 07 2012 _Martin Ettl_(Maxima).lispNov 07 2012 makelist(1, n, 1, 30); /* _Martin Ettl_, Nov 07 2012 */ \ No newline at end of file
 _Michael Somos_(PARI).gpOct 20 1999 {a(n) = if( n<1, n==0, sumdiv(n, k, eulerphi(2*k) * 2^(n/k)) / (2*n))}; /* _Michael Somos_, Oct 20 1999 */ _Reinhard Zumkeller_(Haskell).hsJul 08 2013 a000013 0 = 1 a000013 n = sum (zipWith (*) (map (a000010 . (* 2)) ds) (map (2 ^) \$ reverse ds)) `div` (2 * n) where ds = a027750_row n -- _Reinhard Zumkeller_, Jul 08 2013 _Indranil Ghosh_(Python).pyApr 28 2017 from sympy import divisors, totient def a(n): return 1 if n<1 else sum([totient(2*d)*2**(n/d) for d in divisors(n)])/(2*n) # _Indranil Ghosh_, Apr 28 2017 \ No newline at end of file
 _Michael Somos_(PARI).gpDec 19 2014 {a(n) = my(A); if( n<1, 0, A = x / (1 - x^2) + x * O(x^n); for(k=3, n-1, A /= (1 - x^k + x * O(x^n))^polcoeff(A, k)); polcoeff( (subst(A, x, x^2) * (1 - x) + A * (2 - A) * (1 + x)) / 2, n))}; /* _Michael Somos_, Dec 19 2014 */ \ No newline at end of file
 _Michael Somos_(PARI).gpJul 16 2002 {a(n) = if( n<1, 0, while(matsize(factor(n))[1]>1, n++); n)}; /* _Michael Somos_, Jul 16 2002 */ _Charles R Greathouse IV_(PARI).gpFeb 01 2013 a(n)=if(n>1,while(!isprimepower(n),n++));n \\ _Charles R Greathouse IV_, Feb 01 2013 _Zerinvary Lajos_(Sage).sageJun 13 2009 [next_prime_power(n) for n in range(72)] # _Zerinvary Lajos_, Jun 13 2009 _Reinhard Zumkeller_(Haskell).hsNov 17 2011 a000015 n = a000015_list !! (n-1) a000015_list = 1 : concat (zipWith(\pp qq -> replicate (fromInteger (pp - qq)) pp) (tail a000961_list) a000961_list) -- _Reinhard Zumkeller_, Nov 17 2011, Apr 25 2011 \ No newline at end of file
 unknown(PARI).gpunknown a(n)=if(n<1,n >= 0,sumdiv(n,k,(k%2)*eulerphi(k)*2^(n/k))/(2*n)); _Reinhard Zumkeller_(Haskell).hsMay 01 2012 a000016 0 = 1 a000016 n = (`div` (2 * n)) \$ sum \$ zipWith (*) (map a000010 oddDivs) (map ((2 ^) . (div n)) \$ oddDivs) where oddDivs = a182469_row n -- _Reinhard Zumkeller_, May 01 2012 \ No newline at end of file
 \ No newline at end of file
 unknown(PARI).gpunknown a(n)=local(A);if(n<0,0,A=qfrep([1,0;0,16],2^n);sum(k=1,2^n,A[k]!=0)) \ No newline at end of file
 unknown(GAP).gapunknown List([2..2499],NrPrimitiveGroups); unknown(MAGMA).munknown [NumberOfPrimitiveGroups(i) : i in [1..999]]; \ No newline at end of file
 unknown(PARI).gpunknown a(n)=if(n==1,2,eulerphi(2^n-1)/n) \\ Hauke Worpel (thebigh(AT)outgun.com), Jun 10 2008 \ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment