login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A179382 a(n) is the smallest period of pseudo-arithmetic progression with initial term 1 and difference 2n-1. 19
1, 1, 2, 1, 3, 5, 6, 1, 4, 9, 2, 4, 10, 9, 14, 1, 5, 5, 18, 4, 10, 7, 5, 9, 10, 2, 26, 8, 9, 29, 30, 1, 6, 33, 11, 14, 3, 9, 15, 17, 27, 41, 2, 11, 4, 4, 3, 14, 24, 15, 50, 23, 4, 53, 18, 14, 14, 19, 3, 9, 55, 6, 50, 1, 7, 65, 8, 17, 34, 69, 23, 25, 14, 20, 74, 5, 10, 8, 26, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Let x,y be odd numbers. Denote <+> the following binary operation: x<+>y=A000265(x+y). Let a and d be odd numbers. We call a sequence of the form b, b<+>d, (b<+>d)<+>d,... a pseudo-arithmetic progression with the initial term b and the difference d. It is not difficult to prove that every pseudo-arithmetic progression is periodic sequence. This sequence lists smallest periods of pseudo-arithmetic progressions with initial term 1 and difference 2n-1, n=1,2,...

a(n) is the number of distinct odd residues contained in set {1,2,...,2^(2*n-2)} modulo 2*n-1. Thus 2*n-1 is in A001122 iff a(n)=n-1. - Vladimir Shevelev, Jul 18 2010

LINKS

Peter J. C. Moses, Table of n, a(n) for n = 1..4096

FORMULA

a(n) = A001222(A292239(n-1)). - Antti Karttunen, Oct 04 2017

EXAMPLE

For n=5, we have 1<+>9=5, 5<+>9=7, 7<+>9=1. Thus a(5)=3.

MAPLE

pseuAprog := proc(a, b) A000265(a+b) ; end proc:

A179382 := proc(n) local p, k; p := [1] ; for k from 2 do a := pseuAprog( p[-1], 2*n-1) ; if not a in p then p := [op(p), a] ; else return nops(p) ; end if; end do: end proc:

seq(A179382(n), n=1..80) ;

# R. J. Mathar, Jul 13 2010

MATHEMATICA

oddres[n_] := n/2^IntegerExponent[n, 2];

a[n_] := Module[{d = 2n-1, k=1, t=1}, While[(t = oddres[t+d])>1, k++]; k];

Array[a, 80] (* Jean-Fran├žois Alcover, Apr 13 2020, translated from PARI *)

PROG

(PARI) oddres(n)=n>>valuation(n, 2)

a(n)=my(d=2*n-1, k=1, t=1); while((t=oddres(t+d))>1, k++); k

\\ Charles R Greathouse IV, May 15 2013

(Sage)

def A179382(n):

    N, o, s = 2*n-1, 1, 0

    while True:

        o = (N + o) >> valuation(N + o, 2)

        s = s + 1

        if o == 1: break

    return s

print([A179382(n) for n in (1..72)]) # Peter Luschny, Oct 07 2017

CROSSREFS

Cf. A000265, A001122, A179680, A292239.

Sequence in context: A296064 A167595 A328600 * A161169 A239738 A058202

Adjacent sequences:  A179379 A179380 A179381 * A179383 A179384 A179385

KEYWORD

nonn

AUTHOR

Vladimir Shevelev, Jul 12 2010

EXTENSIONS

Corrected and extended by R. J. Mathar, Jul 13 2010

Duplicated database lines removed by R. J. Mathar, Jul 23 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 8 14:36 EDT 2020. Contains 336298 sequences. (Running on oeis4.)