cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-6 of 6 results.

A036259 Numbers k such that the multiplicative order of 2 modulo k is odd.

Original entry on oeis.org

1, 7, 23, 31, 47, 49, 71, 73, 79, 89, 103, 127, 151, 161, 167, 191, 199, 217, 223, 233, 239, 263, 271, 311, 329, 337, 343, 359, 367, 383, 431, 439, 463, 479, 487, 497, 503, 511, 529, 553, 599, 601, 607, 623, 631, 647, 713, 719, 721, 727, 743, 751
Offset: 1

Views

Author

Keywords

Comments

Odd numbers k such that A007733(k) = A002326((k-1)/2) is odd.
Closed under multiplication. - Emmanuel Vantieghem, May 07 2025

Examples

			2^3 = 1 mod 7, 3 is odd, so 7 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 999, 2], OddQ[MultiplicativeOrder[2, #]]&] (* Jean-François Alcover, Dec 20 2017 *)
  • PARI
    is(n)=n%2 && znorder(Mod(2,n))%2 \\ Charles R Greathouse IV, Jun 24 2015
    
  • Python
    from sympy import n_order
    from itertools import count, islice
    def A036259_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:n_order(2,n)&1,count(max(startvalue,1)|1,2))
    A036259_list = list(islice(A036259_gen(),20)) # Chai Wah Wu, Feb 07 2023

A291755 Compound filter (multiplicative order of 2 mod 2n+1 & eulerphi(2n+1)): a(n) = P(A002326(n), A037225(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 25, 31, 61, 181, 265, 59, 261, 613, 142, 507, 761, 613, 1513, 566, 416, 607, 2521, 607, 1731, 1499, 607, 2301, 1912, 749, 5305, 1731, 1396, 6613, 7081, 826, 1723, 8581, 2102, 5391, 3169, 1731, 3946, 6709, 5725, 13285, 2493, 3431, 4764, 3415, 2356, 5707, 10201, 3946, 19801, 11527
Offset: 0

Views

Author

Antti Karttunen, Oct 02 2017

Keywords

Crossrefs

Cf. A000010, A000027, A002326, A037225, A291766 (rgs-version of this filter).
Cf. also A292249, A292268.

Programs

Formula

a(n) = (1/2)*(2 + ((A002326(n) + A000010(2n+1))^2) - A002326(n) - 3*A000010(2n+1)).

A291766 Restricted growth sequence transform of A291755; filter combining multiplicative order of 2 mod 2n+1 & eulerphi(2n+1) (A002326 & A037225).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 10, 14, 15, 16, 17, 18, 17, 19, 20, 17, 21, 22, 23, 24, 19, 25, 26, 27, 28, 29, 30, 31, 32, 33, 19, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 34, 45, 46, 29, 47, 48, 43, 49, 50, 41, 51, 52, 53, 45, 54, 55, 56, 57, 43, 58, 59, 60, 61, 49, 62, 63, 64, 51, 65, 66, 67, 68, 69, 53, 70, 71, 57, 72, 61, 73, 74, 75, 61
Offset: 0

Views

Author

Antti Karttunen, Oct 02 2017

Keywords

Crossrefs

Cf. A291769, A292267 for related filters.

Programs

  • PARI
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A002326(n) = if(n<0, 0, znorder(Mod(2, 2*n+1))); \\ This function from Michael Somos, Mar 31 2005
    A291755(n) = (1/2)*(2 + ((A002326(n)+eulerphi(n+n+1))^2) - A002326(n) - 3*eulerphi(n+n+1));
    write_to_bfile(0,rgs_transform(vector(32769,n,A291755(n-1))),"b291766_upto32768.txt");

A117548 Values of n for which there exist d(1),...,d(n), each in {0,1,2} and an r in {1,2} such that Sum_{i=1..n-k} d(i)*d(i+k) == r (mod 3) for all k=0..n-1. (Such a sequence is called a very(3,r) sequence. See the link.).

Original entry on oeis.org

1, 2, 5, 6, 7, 12, 14, 17, 20, 24
Offset: 1

Views

Author

John W. Layman, Mar 28 2006

Keywords

Comments

Theorem. Let a be a very(3,r) sequence of length n, for r=1 or 2 and let z be a sequence of n-1 0's. Then az(2a) is a very(3,3-r) sequence of length 3n-1, where 2a denotes the sequence {2a(i) mod 3, i=1..n}.

Examples

			For the sequence d=112102 we get Sum_{i=1..n-k} d(i)*d(i+k) = {11,5,5,5,2,2} = {2,2,2,2,2,2} (mod 3) for k=0..5, so 6 is a term of the sequence.
		

Crossrefs

A117549 Values of n for which there exist d(1),...,d(n), each in {0,1,...,4} and an r in {1,...,4} such that Sum[d(i)d(i+k),i=1,n-k]=r (mod 5) for all k=0,...,n-1. (Such a sequence is called a very(5,r) sequence. See the link.).

Original entry on oeis.org

1, 3, 6, 10, 13, 16
Offset: 1

Views

Author

John W. Layman, Apr 21 2006

Keywords

Comments

Conjecture. Let A be a very(5,1) (respectively very(5,4)) sequence of length n and let Z be a sequence of n-1 0's.. Then AZ(3A)ZA is a very(5,1) (respectively very(5,4)) sequence of length 5n-2. (Here 3A denotes the result of multiplying each term of A by 3, then reducing modulo 5; and juxtaposition of symbols denotes concatenation of sequences.)

Crossrefs

A360388 Positive integers with binary expansion (b(1), ..., b(m)) such that Sum_{i = 1..m-k} b(i)*b(i+k) is odd for all k = 0..m-1.

Original entry on oeis.org

1, 11, 13, 2787, 3189, 36783, 37063, 43331, 47803, 49813, 56669, 58121, 62961, 9205487, 16215601, 23070091, 23248907, 27264653, 27475981, 43469906355, 55167946629, 75985591407, 80056245671, 81489328999, 83389490039, 87235136243, 88437433811, 90400346819
Offset: 1

Views

Author

Rémy Sigrist, Feb 05 2023

Keywords

Comments

Leading zeros in binary expansions are ignored.
All terms are odd and odious (A092246).
This sequence is infinite since we can, from a given term, build another larger term (see Guy reference).
See A053006 for the distinct binary lengths.
If m is a term, then A030101(m) is also a term.

Examples

			For n = 11:
- the binary expansion of 11 is b = (1,1,0,1),
- b(1)*b(1) + b(2)*b(2) + b(3)*b(3) + b(4)*b(4) = 1 + 1 + 0 + 1 = 3 is odd,
- b(1)*b(2) + b(2)*b(3) + b(3)*b(4) = 1 + 0 + 0 = 1 is odd,
- b(1)*b(3) + b(2)*b(4) = 0 + 1 = 1 is odd,
- b(1)*b(4) = 1 is odd,
- so 11 belongs to the sequence.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, E38.

Crossrefs

Programs

  • PARI
    See Links section.
    
  • Python
    from itertools import count, islice
    from functools import reduce
    from operator import ixor
    def A360388_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            b = tuple(int(d) for d in bin(n)[2:])
            m = len(b)
            if all(reduce(ixor, (b[i]&b[i+k] for i in range(m-k))) for k in range(m)):
                yield n
    A360388_list = list(islice(A360388_gen(),10)) # Chai Wah Wu, Feb 07 2023
Showing 1-6 of 6 results.