Mailing filter

Leroy Quet qq-quet at mindspring.com
Mon Jan 1 22:41:48 CET 2007


sometimes emails don't get sent through, it seems. However, some list 
Return-Path: <grafix at csl.pl>
X-Ids: 165
X-Virus-Scanned: amavisd-new at nemesis.etop.pl
Date: Mon, 01 Jan 2007 22:58:18 +0100
To: Artur <grafix at csl.pl>, "Jonathan Post" <jvospost3 at gmail.com>
Subject: Re: Help Needed
From: Artur <grafix at csl.pl>
Cc: jvospost2 at yahoo.com, seqfan at ext.jussieu.fr
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-2
MIME-Version: 1.0
References: <8C8F8FDECD755A8-4F0-B12F at FWM-M05.sysops.aol.com> <8C8F9E2D56C2AB6-10B8-50F1 at FWM-M15.sysops.aol.com> <op.tldec2d2at030q at tata.domain_not_set.invalid> <op.tldsb7coui647s at eponymous> <op.tldu6hveat030q at tata.domain_not_set.invalid> <4597F95F.6040506 at indiana.edu> <op.tlhfm4kgat030q at tata.domain_not_set.invalid> <5542af940701011029m365932bfi92f71fbf71404599 at mail.gmail.com> <op.tlhp32tpat030q at tata.domain_not_set.invalid>
Content-Transfer-Encoding: 8bit
Message-ID: <op.tlhwngwmat030q at tata.domain_not_set.invalid>
In-Reply-To: <op.tlhp32tpat030q at tata.domain_not_set.invalid>
User-Agent: Opera Mail/9.01 (Win32)
X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-2.0.2 (shiva.jussieu.fr [134.157.0.165]); Mon, 01 Jan 2007 22:58:38 +0100 (CET)
X-j-chkmail-Score: MSGID : 4599840E.000 on shiva.jussieu.fr : j-chkmail score : X : 0/50 0 0.532 -> 1
X-Miltered: at shiva.jussieu.fr with ID 4599840E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!

I would like to ask that is know another approximation functions on  
PrimePi[(x+1)^2]-PrimePi[(x)^2] than 3 bellow
\!\(Plot[{LogIntegral[\((x + 1)\)^2] - LogIntegral[\((x)\)^2], \((
               x + 1)\)^2\/\(2  Log[x + 1]\) - x^2\/\(2  Log[x]\), \(3\ \((
       x + 1)\)^2 + 2\ \((x + 1)\)^2\ \ 2  Log[x + 1]\)\/\(2\ Log[\((x +
         1)\)^2]\^2\) - \(3\ \((x)\)^2 + 2\ \((x)\)^2\ \ 2  Log[x]\)\/\(2\ \
Log[\((x)\)^2]\^2\)}, {x, 2, 20000}, PlotStyle -> {RGBColor[1, 0, 1], \
Thickness[0.01], RGBColor[1, 0, 0], Thickness[0.01], RGBColor[1, 1, 0], \
Thickness[0.01]}]\)
Also in range up to 20000 work good
0.27232130597375526((x - 1)^2 - 1)^(.45)

ARTUR


Dnia 01-01-2007 o 20:37:04 Artur <grafix at csl.pl> napisa³(a):

> 1) My picture was to the A014085
> 2) I nothink proof, only I was do picture which visualize that in case  
> that for some very big n
> will be only 1 prime (or not semiprime case) that will be catastrophe.
> ARTUR
>
>
> Dnia 01-01-2007 o 19:29:27 Jonathan Post <jvospost3 at gmail.com>  
> napisa³(a):
>
>>  A007491
>
>
>
> __________ NOD32 Informacje 1949 (20061230) __________
>
> Wiadomosc zostala sprawdzona przez System Antywirusowy NOD32
> http://www.nod32.com lub http://www.nod32.pl
>






Dear Seqfans,  There are very few Python programs in the OEIS.
I would like to get more - even for the simplest sequences,
and especially for all the important sequences, whenever appropriate.

I would prefer readable programs (rather than the opaque one-line
Mma programs that the OEIS is full of).  For one thing, that
will enable people to learn Python.

Since leading spaces and newlines have a special meaning in Python,
we are using the style illustrated below:

%I A071531
%S A071531 10,10,5,8,9,4,4,5,1,5,4,6,7,4,3,7,4,4,1,5,3,6,6,4,6,5,5,4,1,6,2,2,3,4,
%T A071531 5,3,4,5,1,5,3,3,4,2,5,2,2,2,1,2,2,2,4,2,5,4,6,3,1,5,6,3,2,4,6,3,9,3,1,
%U A071531 2,6,3,3,4,8,4,2,3,1,4,5,5,2,4,3,3,6,3,1,5,5,3,3,2,7,2,2,2,1,1,1,1,1,1
%N A071531 Smallest exponent r such that n^r contains a zero digit (in base 10).
%C A071531 Does r always exist? Is it bounded? Is 10 an upper bound?
%e A071531 a(4)=5 because 4^1=4, 4^2=16, 4^3=64, 4^4=256, 4^5=1024 (has zero digit)
%o A071531 # Python program from Tim Peters, May 19 2005. (Change leading dots to blanks.)
%o A071531 def has_zero_digit(x):
%o A071531 ... while x:
%o A071531 ....... x, r = divmod(x, 10)
%o A071531 ....... if r == 0:
%o A071531 ........... return True
%o A071531 ... return False
%o A071531 def a(n):
%o A071531 ... r, p = 1, n
%o A071531 ... while 1:
%o A071531 ....... if has_zero_digit(p):
%o A071531 ........... return r
%o A071531 ....... r += 1
%o A071531 ....... p *= n
%o A071531 for n in xrange(2, 1000000):
%o A071531 ... print n, a(n)
%K A071531 base,nonn
%O A071531 2,1
%A A071531 Paul Stoeber (paul.stoeber(AT)stud.tu-ilmenau.de), Jun 02 2002

In other words, use dots to get the correct indentation, and begin with a line like this:

%o A071531 # Python program from Tim Peters, May 19 2005. (Change leading dots to blanks.)

You could send me such programs in plain text email.

Here are four more examples:

%o A001047 (Python) [3**n - 2**n for n in range(25)] - Ross La Haye (rlahaye(AT)new.rr.com), Aug 19 2005

%o A005150 (Python, from Olivier Mengue (dolmen(AT)users.sourceforge.net), Jul 01 2005: replace leading dots by blanks before running)
%o A005150 def A005150(n):
%o A005150 ... p = "1"
%o A005150 ... seq = [1]
%o A005150 ... while (n > 1):
%o A005150 ....... q = ''
%o A005150 ....... idx = 0 # Index
%o A005150 ....... l = len(p) # Length
%o A005150 ....... while idx < l:
%o A005150 ........... start = idx
%o A005150 ........... idx = idx + 1
%o A005150 ........... while idx < l and p[idx] == p[start]:
%o A005150 ............... idx = idx + 1
%o A005150 ........... q = q + str(idx-start) + p[start]
%o A005150 ....... n, p = n - 1, q
%o A005150 ....... seq.append(int(p))
%o A005150 ... return seq

%o A048927 (Python: replace leading dots by blanks):
%o A048927 def ways (n, left=5, last=1):
%o A048927 . a=last; a3=a*a*a; c=0
%o A048927 . while a3<=n-left+1:
%o A048927 ... if left>1:
%o A048927 ..... c=c+ways(n-a3, left-1, a)
%o A048927 .... elif a3==n:
%o A048927 ..... c=c+1
%o A048927 ... a=a+1; a3=a*a*a
%o A048927 . return c
%o A048927 for n in range (1,1000):
%o A048927 . c=ways(n)
%o A048927 . if c==2:
%o A048927 ... print n,

%o A086638 (Python: replace leading dots by blanks before running)
%o A086638 def A086638():
%o A086638 ... yield 0
%o A086638 ... for x in A086638():
%o A086638 ....... if x & 3:
%o A086638 ........... yield 2*x
%o A086638 ....... if not (x & 1):
%o A086638 ........... yield 2*x+1

Thanks,  Neil





More information about the SeqFan mailing list