sloane's integer sequences and maxima



On Monday 08 September 2008 12:06:42 andre maute wrote:
> wouldn't it be nice to optionally ship a version
> of sloane's integer sequences with maxima?

Here is my interface for EIS: http://beshenov.ru/maxima/eis/

eis-maxima-data.tar.bz2 takes 42M, so I'm sure it should be
distributed as a separate package.

Example:
-----------------------------------------------------------------

(%i1) load ("/usr/share/eis-maxima/eis.lisp")$

(%i2) eis_search (1, 2, 3, 4, 6, 9);
(%o2) [A000792, A000930, A001115, A001521, A001935, A003143, 
A005428, A007210, A007604, A013950, A014851, A016028, A017823, 
A017824, A017825, A017826, A017982, A017983, A018130, A018140, 
A018256, A018287, A018393, A018431, A018471, A018550, A018591, 
A018669, A018752, A022159, A022161, A022859, A022860, A022875, 
A022956, A026437, A027338, A027594, A027751, A033069, A035312, 
A035947, A035952, A035958, A035965, A035973, A035982, A035992, 
A036003, A036561, A039865, A039884, A046097, A047419, A048249, 
A051404, A056230, A056751, A057285, A057287, A058355, A060729, 
A061481, A062121, A062437, A064174, A068921, A069907, A073576, 
A073941, A076968, A078012, A078529, A078620, A078932, A081237, 
A081419, A081454, A081532, A082976, A083197, A089797, A094054, 
A094995, A096824, A097557, A098578, A098889, A099558, A101626, 
A103481, A105781, A108858, A111251, A111791, A111792, A112868, 
A113197, A113199, A117791, A119919, A121653, A123648, A126011, 
A127604, A128166, A128399, A129632, A130899, A131338, A132134, 
A132600, A135205, A135851, A136423, A136561, A138029, A138857, 
A138881, A139040, A139076, A139077, A141396, A143951, A144429, 
A145733]

(%i3) eis_name (A018591)$
  A018591 - Divisors of 684.

(%i4) eis_search_name (1, 2, 3, 4, 6, 9, 8)$
  A036561 - Triangle of numbers in which i-th row is
            {2^(i-j)*3^j, 0<=j<=i}; i >= 0.

  A082976 - Erroneous version of A036561.

  A119919 - Table read by antidiagonals: number of rationals in
            [0, 1) having at most n preperiodic bits, then at
            most k periodic bits (read up antidiagonals).

(%i5) eis_details (A124136)$

A124136 - a(n) is the smallest prime when larger number of primes
          arise between numbers and their doubles. Note for
          example that there are 8 primes between 34 and 2*34=68
          and 35 and 2*35=70, but 34 and 35 are not primes and
          a(8)=37, which is the smallest prime where there are
          already nine primes between numbers 36, 37, 38, 39, 41,
          43, 44, 47, 48 and their doubles.

UNSIGNED TERMS
  2, 7, 11, 17, 23, 29, 31, 37, 53, 59, 71, 79, 89, 97, 101, 127,
137, 149, 157, 179, 191, 211, 223, 233, 251, 257, 263, 293, 307,
311, 331, 347, 367, 373, 379, 389, 409, 419, 431, 443, 457, 479,
487, 499, 521, 541, 547, 557, 563, 587, 599, 613, 617, 631, 641

OFFSET
  1, 1

EXAMPLES
  a(2)=7 since 7 is first prime when two primes are between 7 and
its double.
  a(10)=59 since 59 is first prime after 55 and 56 when ten
primes are between these numbers and their doubles.

MAPLE PROGRAM
  ts_c:=proc(n) local i,j,st_p,max_stp,ans; ans:= [ ]: st_p:=0:
max_stp:=0: for i from 2 to n do for j from i+1 to 2*i-1 do if
(isprime(j) = 'true') then st_p:=st_p+1: fi od: if (st_p >
max_stp and isprime(i) = 'true') then max_stp := st_p: ans:=[
op(ans),i ]: fi; st_p:=0: od: RETURN(ans) end: ts_c(1200);

CROSS-REFERENCES
  Cf. A060756, A060715, A084139.
  Adjacent sequences: A124133 A124134 A124135 this_sequence
A124137 A124138 A124139
  Sequence in context: A090613 A063097 A038942 this_sequence
A019385 A075552 A124854

COMMENTS
  a(n) is the index of first occurrence of prime n in A060715.

KEYWORDS
  nonn, uned

AUTHOR
  Jani Melik (jani_melik(AT)hotmail.com), Nov 30 2006
-----------------------------------------------------------------

-- 
Setting Orange, Chaos 25 YOLD 3175
Alexey Beshenov  http://beshenov.ru/