Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A066923
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A066923 Let f(x) = eulerphi(x) + sigma(x); a(n) = least k such that at k begins a maximal run of length n of consecutive strict local extrema of f, or 0 if no such k exists. +0
2
118, 12, 443, 190, 40, 16, 5847, 180, 108, 48, 1427, 670510, 2388, 228, 407, 1577, 424, 2500, 2500383, 22848, 4853, 1240, 323975, 0, 10668, 588, 10727, 45677, 18713, 1903672, 0, 0, 119028, 18880, 391659, 0, 883428, 480036, 1635467, 896933, 50380 (list; graph; listen)
OFFSET

1,1

COMMENT

A084622 gives the strict local extrema for f. A run of consecutive strict local extrema of a function is sometimes called a zigzag, cf. A066485. A066918 is an analogue of the present sequence for the prime gaps function.

The zero terms a(24), a(31), a(32), a(36) are preliminary since only values of f(n) for n up to 6000000 were taken into account. Further nonzero terms are a(45) = 1413696, a(46) = 185195, a(49) = 4961856, a(50) = 2370036.

EXAMPLE

f(10) = 22, f(11) = 22, f(12) = 32, f(13) = 26, f(14) = 30, f(15) = 32. A run of length 2 begins at f(12) = 32 because f(12) = 32 is a local maximum and f(13) = 26 is local minimum.

This is a maximal run, since neither f(11) = 22 nor f(14) = 30 are local extrema of f. Also, a maximal run of length 2 first occurs at f(12) = 32. Therefore a(2) = 12.

MATHEMATICA

f[ n_ ] := EulerPhi[ n ] + DivisorSigma[ 1, n ]; e[ n_ ] := (f[ n - 1 ] < f[ n ] && f[ n + 1 ] < f[ n ]) || (f[ n - 1 ] > f[ n ] && f[ n + 1 ] > f[ n ]); z[ n_, k_ ] := Module[ {r = True, i = 0}, While[ i <= k && r == True, If[ e[ n + i ], r = False ]; i++ ]; r ]; z2[ n_, k_ ] := z[ n, k ] && ! e[ n + k + 1 ] && ! e[ n - 1 ]; k[ n_ ] := Module[ {i = 2, r = False}, While[ r == False && i < 10^6, If[ z2[ i, n ], r = True; Print[ i ] ]; i++ ]; If[ r == False, Print[ "0" ] ] ]; Table[ {i, k[ i ]}, {i, 0, 17} ]

PROGRAM

(PARI) f(x)=eulerphi(x)+sigma(x)

{locext(n)=local(a, b, c); a=if(n<2, 0, f(n-1)); b=f(n); c=f(n+1); if(a<b&&b>c, 1, if(a>b&&b<c, -1, 0))}

{m=6000000; u=50; v=vector(u); n=1; while(n<m, if((a=locext(n))==0, n++, s=n; n++; c=1; while((b=locext(n))==-a, a=b; c++; n++); if(c<=u&&v[c]==0, v[c]=s))); v}

CROSSREFS

Cf. A066485, A066918, A084622.

Sequence in context: A027511 A079196 A113798 this_sequence A039556 A095627 A066734

Adjacent sequences: A066920 A066921 A066922 this_sequence A066924 A066925 A066926

KEYWORD

nonn

AUTHOR

Joseph L. Pe (joseph_l_pe(AT)hotmail.com), Jan 23 2002

EXTENSIONS

Edited, corrected (a(12)) and extended (a(19) ff.) by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jun 01 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified August 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research