prime descents

Wouter Meeussen eu000949 at pophost.eunet.be
Fri Feb 19 00:21:08 CET 1999


hi all,

I would appreciate comments or pointers for the following sequences:

take a number n,
if it is prime, then leave it as is,
if it is odd, replace it with (n-1)/2 (=downward= "ner")
if it is even, replace it with n/2,
and repeat until a fixed point is found (must be prime).

variation : change the odd ones upward to (n+1)/2 (="upp")

other variation: start with prime(n)+1 instead of n
other variation: start with prime(n)-1

in all (combinations of) the above, we can also count the number
of steps required to get to the fixed point 
(instead of reporting the rock-bottom-prime itself)

general observation:
plots of ner[n] and upp[n] are quite similar,
consisting of lines for the primes p,n= 2p +/- 1,n= 2(2p+/-1)+/-1, ... 

starting from the n-th primes +/-1 gives analogous plots.

The record holders (envelope) are identical for both upp & ner series:

record at position=n for both  odd+/-1 & half on p(n)-1 
record prime values  for both  odd+/-1 & half on p(n)-1
record at position=n for both  odd+/-1 & half on p(n)+1
record prime values  for both  odd+/-1 & half on p(n)+1

(they have not been EISed so far)
------------------------------------------------------------


%I A000001 
%S A000001 1,2,3,2,5,3,7,2,2,5,11,3,13,7,7,2,17,2,19,5,5,11,23,3,3,13,13,7,29,7,
%T A000001 31,2,2,17,17,2,37,19,19,5,41,5,43,11,11,23,47,3,3,3,3,13,53,13,13,7,
%U A000001 7,29,59,7,61,31,31,2,2,2,67,17,17,17,71,2,73,37,37,19,19,19,79,5,5
%N A000001 fixed point of n/2 or (n-1)/2 until result is prime
%R A000001 
%Y A000001 cf. A000011
%A A000001 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000001 0,2
%t A000001 ner[n_Integer]:=FixedPoint[If[EvenQ[#]&&#>2,#/2,If[PrimeQ[#]||(#===
1),#,(#-1)/2]]&,n,20]
%K A000001 nonn


%I A000011 
%S A000011 1,2,3,2,5,3,7,2,5,5,11,3,13,7,2,2,17,5,19,5,11,11,23,3,13,13,7,7,29,
%T A000011 2,31,2,17,17,5,5,37,19,5,5,41,11,43,11,23,23,47,3,13,13,13,13,53,7,7,
%U A000011 7,29,29,59,2,61,31,2,2,17,17,67,17,5,5,71,5,73,37,19,19,5,5,79,5,41
%N A000011 fixed point of n/2 or (n+1)/2 until result is prime
%R A000011 
%Y A000011 cf. A000001
%A A000011 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000011 0,2
%t A000011 upp[n_Integer]:=FixedPoint[If[EvenQ[#]&&#>2,#/2,If[PrimeQ[#]||(#===
1),#,(#+1)/2]]&,n,20]
%K A000011 nonn


%I A000002 
%S A000002 1,1,1,2,1,2,1,3,3,2,1,3,1,2,2,4,1,4,1,3,3,2,1,4,4,2,2,3,1,3,1,5,5,2,
%T A000002 2,5,1,2,2,4,1,4,1,3,3,2,1,5,5,5,5,3,1,3,3,4,4,2,1,4,1,2,2,6,6,6,1,3,
%U A000002 3,3,1,6,1,2,2,3,3,3,1,5,5,2,1,5,5,2,2,4,1,4,4,3,3,2,2,6,1,6,6,6,1,6
%N A000002 steps untill fixed point of n/2 or (n-1)/2 until result is prime
%R A000002 
%Y A000002 cf. A000012
%A A000002 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000002 0,4
%t A000002 nerlist[n_Integer]:=Length/@Drop[FixedPointList[If[EvenQ[#]&&#>2,#/
2,If[PrimeQ[#]||(#===1),#,(#-1)/2]]&,n,20],-1]
%K A000002 nonn


%I A000012 
%S A000012 1,1,1,2,1,2,1,3,2,2,1,3,1,2,4,4,1,3,1,3,2,2,1,4,2,2,3,3,1,5,1,5,2,2,
%T A000012 4,4,1,2,4,4,1,3,1,3,2,2,1,5,3,3,3,3,1,4,4,4,2,2,1,6,1,2,6,6,3,3,1,3,
%U A000012 5,5,1,5,1,2,3,3,5,5,1,5,2,2,1,4,2,2,4,4,1,3,3,3,2,2,6,6,1,4,4,4,1,4
%N A000012 steps untill fixed point of n/2 or (n+1)/2 until result is prime
%R A000012 
%Y A000012 cf. A000002
%A A000012 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000012 0,4
%t A000012 upplist[n_Integer]:=Length/@Drop[FixedPointList[If[EvenQ[#]&&#>2,#/
2,If[PrimeQ[#]||(#===1),#,(#+1)/2]]&,n,20],-1]
%K A000012 nonn


%I A000003 
%S A000003 1,2,2,3,5,3,2,2,11,7,7,2,5,5,23,13,29,7,2,17,2,19,41,11,3,3,3,53,13,
%T A000003 7,31,2,17,17,37,37,19,5,83,43,89,11,47,3,3,3,13,13,113,7,29,59,7,31,
%U A000003 2,131,67,67,17,17,17,73,19,19,19,79,41,5,173,43,11,179,11,23,47,191
%N A000003 fixed point of n/2 or (n-1)/2 until result is prime, operating on
prime(n)-1
%R A000003 
%Y A000003 cf. A000011
%A A000003 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000003 0,2
%t A000003 see A000001
%K A000003 nonn


%I A000004 
%S A000004 3,2,3,2,3,7,2,5,3,7,2,19,5,11,3,13,7,31,17,2,37,5,5,11,3,3,13,13,13,
%T A000004 7,2,2,17,17,37,19,79,41,5,43,11,11,3,97,3,3,53,7,7,7,29,7,7,31,2,2,
%U A000004 67,17,139,17,71,73,19,19,157,79,83,5,43,43,11,11,23,23,47,3,97,199,3
%N A000004 fixed point of n/2 or (n-1)/2 until result is prime, operating on
prime(n)+1
%R A000004 
%Y A000004 cf. A000011
%A A000004 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000004 0,1
%t A000004 see A000001
%K A000004 nonn


%I A000013 
%S A000013 1,2,2,3,5,3,2,5,11,7,2,5,5,11,23,13,29,2,17,5,5,5,41,11,3,13,13,53,7,
%T A000013 7,2,17,17,5,37,19,5,41,83,43,89,23,3,3,13,13,53,7,113,29,29,2,2,2,2,
%U A000013 131,67,17,5,5,71,73,5,5,5,79,83,11,173,11,11,179,23,47,3,191,97,13
%N A000013 fixed point of n/2 or (n+1)/2 until result is prime, operating on
prime(n)-1
%R A000013 
%Y A000013 cf. A000001
%A A000013 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000013 0,2
%t A000013 see A000010
%K A000013 nonn


%I A000014 
%S A000014 3,2,3,2,3,7,5,5,3,2,2,19,11,11,3,7,2,31,17,5,37,5,11,23,13,13,13,7,7,
%T A000014 29,2,17,5,5,19,19,79,41,11,11,23,23,3,97,13,13,53,7,29,29,59,2,61,2,
%U A000014 17,17,17,17,139,71,71,37,5,5,157,5,83,43,11,11,89,23,23,47,3,3,13
%N A000014 fixed point of n/2 or (n+1)/2 until result is prime, operating on
prime(n)+1
%R A000014 
%Y A000014 cf. A000001
%A A000014 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000014 0,1
%t A000014 see A000010
%K A000014 nonn


%I A000005 
%S A000005 1,1,2,2,2,3,4,4,2,3,3,5,4,4,2,3,2,4,6,3,6,3,2,4,6,6,6,2,4,5,3,7,4,4,
%T A000005 3,3,4,6,2,3,2,5,3,7,7,7,5,5,2,6,4,3,6,4,8,2,3,3,5,5,5,3,5,5,5,3,4,7,
%U A000005 2,4,6,2,6,5,4,2,3,8,8,8,6,6,3,6,3,6,7,7,7,7,2,2,7,4,5,2,3,9,9,4,6,3
%N A000005 steps until fixed point of n/2 or (n-1)/2 until result is prime,
operating on prime(n)-1
%R A000005 
%Y A000005 cf. A000003
%A A000005 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000005 0,3
%t A000005 see A000002
%K A000005 nonn


%I A000006 
%S A000006 1,2,2,3,3,2,4,3,4,3,5,2,4,3,5,3,4,2,3,6,2,5,5,4,6,6,4,4,4,5,7,7,4,4,
%T A000006 3,4,2,3,6,3,5,5,7,2,7,7,3,6,6,6,4,6,6,4,8,8,3,5,2,5,3,3,5,5,2,3,3,7,
%U A000006 4,4,6,6,5,5,4,8,3,2,8,8,6,2,6,6,6,6,7,2,7,5,5,7,4,4,5,5,3,9,3,2,3,3
%N A000006 steps until fixed point of n/2 or (n-1)/2 until result is prime,
operating on prime(n)+1
%R A000006 
%Y A000006 cf. A000004
%A A000006 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000006 0,2
%t A000006 see A000002
%K A000006 nonn

%I A000015 
%S A000015 1,1,2,2,2,3,4,3,2,3,5,4,4,3,2,3,2,6,3,5,5,5,2,4,6,4,4,2,5,5,7,4,4,6,
%T A000015 3,4,6,3,2,3,2,4,7,7,5,5,3,6,2,4,4,8,8,8,8,2,3,5,7,7,3,3,7,7,7,3,3,6,
%U A000015 2,6,6,2,5,4,8,2,3,6,6,6,4,4,7,7,7,7,7,5,5,5,2,2,4,5,9,2,3,6,3,6,3,3
%N A000015 steps until fixed point of n/2 or (n+1)/2 until result is prime,
operating on prime(n)-1
%R A000015 
%Y A000015 cf. A000013
%A A000015 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000015 0,3
%t A000015 see A000012
%K A000015 nonn


%I A000016 
%S A000016 1,2,2,3,3,2,3,3,4,5,5,2,3,3,5,4,6,2,3,5,2,5,4,3,4,4,4,5,5,3,7,4,6,6,
%T A000016 4,4,2,3,5,5,4,4,7,2,5,5,3,6,4,4,3,8,3,8,5,5,5,5,2,3,3,4,7,7,2,7,3,4,
%U A000016 6,6,3,5,5,4,8,8,6,2,3,3,4,2,7,3,7,7,3,2,5,5,4,9,4,5,9,9,9,3,3,2,3,8
%N A000016 steps until fixed point of n/2 or (n+1)/2 until result is prime,
operating on prime(n)+1
%R A000016 
%Y A000016 cf. A000014
%A A000016 Wouter Meeussen, w.meeussen.vdmcc at vandemoortele.be
%O A000016 0,2
%t A000016 see A000012
%K A000016 nonn

Dr. Wouter L. J. MEEUSSEN
w.meeussen.vdmcc at vandemoortele.be
eu000949 at pophost.eunet.be






More information about the SeqFan mailing list