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.

Previous Showing 91-100 of 198 results. Next

A137605 Consider the sequence: b(0) = n, and for k >= 1, b(k) = b(k-1)/2 if b(k-1) is even, otherwise b(k) = n - (b(k-1)+1)/2. Then a(n) = m, where m is the smallest index such that b(m) = 1.

Original entry on oeis.org

0, 1, 1, 2, 2, 4, 5, 3, 3, 8, 5, 10, 9, 8, 13, 4, 4, 11, 17, 11, 9, 6, 11, 22, 20, 7, 25, 19, 8, 28, 29, 5, 5, 32, 21, 34, 8, 19, 29, 38, 26, 40, 7, 27, 10, 11, 9, 35, 23, 14, 49, 50, 11, 52, 17, 35, 13, 43, 11, 23, 54, 19, 49, 6, 6, 64, 17, 35, 33, 68, 45, 59, 13, 41, 73, 14, 23, 19, 25
Offset: 1

Views

Author

Yasutoshi Kohmoto, Apr 23 2008

Keywords

Comments

The first occurrence of the numbers 0, 1, 2, 3, 4, ... is at indices 1, 2, 4, 8, 6, 7, 22, 26, 10, 13, 12, 18, 1366, 15, 50, 386, ... - Robert G. Wilson v, May 15 2008

Examples

			6->3->4->2->1. So a(6)=4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{lst = {n}, a}, While[a = lst[[ -1]]; a != 1, If[EvenQ@a, AppendTo[lst, a/2], AppendTo[lst, lst[[1]] - (a + 1)/2]]]; Length@ lst - 1]; Array[f, 79] (* Robert G. Wilson v, May 15 2008 *)

Formula

For n>2, if 2n-1 is in A014657, then a(n) = A002326(n-1)/2 - 1, otherwise a(n) = A002326(n-1) - 1. In particular, if A002326(n-1) is odd, then a(n) = A002326(n-1) - 1. - Max Alekseyev, May 21 2008, Dec 09 2017
For n>2, a(n) = A003558(n-1) - 1. - Joerg Arndt, Sep 12 2013

Extensions

More terms from Robert G. Wilson v, May 15 2008
Edited by Max Alekseyev, Dec 09 2017

A217469 Multiplicative order of 5 (mod 5*n + 1).

Original entry on oeis.org

2, 5, 4, 6, 4, 3, 6, 20, 22, 16, 6, 30, 10, 5, 9, 54, 42, 12, 8, 25, 52, 36, 14, 55, 6, 65, 16, 46, 72, 75, 4, 66, 82, 18, 20, 15, 6, 19, 42, 22, 102, 35, 18, 16, 112, 30, 29, 40, 20, 25, 64, 42, 18, 27, 22, 140, 20, 96, 36, 42, 48, 155, 39, 106, 54, 165, 12, 15
Offset: 1

Views

Author

Arkadiusz Wesolowski, Nov 16 2012

Keywords

Comments

Least m such that 5*n + 1 divides 5^m - 1.

Crossrefs

Programs

  • GAP
    List([1..80],n->OrderMod(5,5*n+1)); # Muniru A Asiru, Feb 26 2019
  • Mathematica
    Table[MultiplicativeOrder[5, 5*n + 1], {n, 68}]
  • PARI
    vector(80, n, znorder(Mod(5, 5*n+1))) \\ Michel Marcus, Feb 09 2015
    

A246717 Numbers of the form 2n - 1 such that A246702(n) = 2.

Original entry on oeis.org

7, 17, 23, 35, 41, 47, 49, 71, 77, 79, 95, 97, 103, 115, 137, 143, 167, 175, 191, 193, 199, 209, 235, 239, 245, 263, 271, 289, 295, 299, 311, 313, 319, 335, 343, 359, 367, 371, 383, 395, 401, 407, 409, 413, 415, 437, 449, 463, 475, 479, 487, 503, 515, 517, 521, 529, 535, 539, 551, 569, 575, 581, 583, 599, 607, 611, 647, 649, 667, 695, 707
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 15 2014

Keywords

Comments

From Antti Karttunen, Nov 15 2014: (Start)
Equally: Odd numbers n for which A246702((n+1)/2) = 2.
Primes in this sequence: 7, 17, 23, 41, 47, 71, 79, ... seem to be A115591.
A249819 gives the composite terms.
(End)

Crossrefs

Programs

  • PARI
    isA246717(n) = { if(!(n%2), return(0), my(u, s=0); u = n^2; for(k=1, u-1, if(!(((2^k)-1)%u), s++;if(s > 2, return(0)))); return(2==s)); }
    n = 0; i = 0; while(i < 105, n++; if(isA246717(n), i++; write("b246717.txt", i, " ", n))); \\ From Antti Karttunen, Nov 15 2014
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A246717 (MATCHING-POS 1 1 (lambda (n) (and (odd? n) (= 2 (A246702 (/ (+ 1 n) 2)))))))

Extensions

Terms corrected by Antti Karttunen, Nov 15 2014

A292267 Restricted growth sequence transform of A292268; filter combining multiplicative order of 2 mod 2n+1 and the number of trailing 1's in binary expansion of 2n+1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 02 2017

Keywords

Crossrefs

Cf. A291766, A291769 for related filters.

Programs

  • PARI
    allocatemem(2^30);
    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
    A007814(n) = valuation(n,2);
    A292268(n) = (1/2)*(2 + ((A002326(n)+A007814(2*(1+n)))^2) - A002326(n) - 3*A007814(2*(1+n)));
    write_to_bfile(0,rgs_transform(vector(32769,n,A292268(n-1))),"b292267_upto32768.txt");

A296243 Numbers k such that the multiplicative order of 2 modulo k is even.

Original entry on oeis.org

3, 5, 9, 11, 13, 15, 17, 19, 21, 25, 27, 29, 33, 35, 37, 39, 41, 43, 45, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 75, 77, 81, 83, 85, 87, 91, 93, 95, 97, 99, 101, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 153
Offset: 1

Views

Author

Max Alekseyev, Dec 09 2017

Keywords

Comments

Odd numbers k such that A007733(k) = A002326((k-1)/2) is even.

Crossrefs

Set difference of A005408 and A036259.
Contains A296244 as a subsequence.
The prime terms are given by A014662.

Programs

  • Mathematica
    A036259 = Select[Range[1, 199, 2], OddQ[MultiplicativeOrder[2, #]] &];
    Range[1, A036259[[-1]], 2] ~Complement~ A036259 (* Jean-François Alcover, Dec 20 2017 *)
    Select[Range[1, 153, 2], EvenQ[MultiplicativeOrder[2, #]] &] (* Amiram Eldar, Jul 30 2020 *)
  • PARI
    { is_A296243(n) = (n%2) && !(znorder(Mod(2,n))%2); }

A302141 Multiplicative order of 16 mod 2n+1.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 3, 1, 2, 9, 3, 11, 5, 9, 7, 5, 5, 3, 9, 3, 5, 7, 3, 23, 21, 2, 13, 5, 9, 29, 15, 3, 3, 33, 11, 35, 9, 5, 15, 39, 27, 41, 2, 7, 11, 3, 5, 9, 12, 15, 25, 51, 3, 53, 9, 9, 7, 11, 3, 6, 55, 5, 25, 7, 7, 65, 9, 9, 17, 69, 23, 15, 7, 21, 37, 15, 6, 5, 13, 13, 33, 81, 5, 83, 39, 9, 43, 15, 29, 89, 45, 15, 9, 10, 9, 95, 24, 3, 49, 99, 33
Offset: 0

Views

Author

Jianing Song, Apr 02 2018

Keywords

Comments

Reptend length of 1/(2n+1) in hexadecimal.
a(n) <= n; it appears that equality holds if and only if n=1 or is in A163778. - Robert Israel, Apr 02 2018
From Jianing Song, Dec 24 2022: (Start)
a(n) <= psi(2*n+1)/2 <= n. a(n) = psi(2*n+1)/2 if and only if the multiplicative order of 2 modulo 2*n+1 is psi(2*n+1) or psi(2*n+1)/2, and psi(2*n+1) == 2 (mod 4).
a(n) = n if and only if A053447(n) = n and A053447(n) is odd. As a result, a(n) = n if and only if 2*n+1 = p is a prime congruent to 3 modulo 4, and the multiplicative order of 2 modulo p is p-1 or (p-1)/2 (p-1 if p == 3 (mod 8), (p-1)/2 if p == 7 (mod 8)). Such primes p are listed in A105876. (End)

Examples

			The fraction 1/13 is equal to 0.13B13B... in hexadecimal, so a(6) = 3.
		

Crossrefs

Programs

  • GAP
    List([0..100],n->OrderMod(16,2*n+1)); # Muniru A Asiru, Feb 25 2019
  • Magma
    [1] cat [ Modorder(16, 2*n+1): n in [1..100]]; // Vincenzo Librandi, Apr 03 2018
    
  • Maple
    seq(numtheory:-order(16, 2*n+1), n=0..100); # Robert Israel, Apr 02 2018
  • Mathematica
    Table[MultiplicativeOrder[16, 2 n + 1], {n, 0, 150}] (* Vincenzo Librandi, Apr 03 2018 *)
  • PARI
    a(n) = znorder(Mod(16, 2*n+1)) \\ Felix Fröhlich, Apr 02 2018
    

Formula

a(n) = A002326(n)/gcd(A002326(n),4) = A053447(n)/gcd(A053447(n),2). [Corrected by Jianing Song, Dec 24 2022]

A306413 a(n) is the multiplicative order of 2 modulo A001567(n).

Original entry on oeis.org

10, 40, 28, 24, 18, 36, 28, 11, 56, 36, 60, 28, 36, 16, 230, 15, 14, 660, 36, 52, 80, 198, 30, 252, 72, 200, 60, 58, 20, 42, 22, 45, 48, 28, 96, 70, 40, 48, 460, 180, 60, 3432, 88, 72, 102, 112, 168, 44, 264, 60, 192, 21, 144, 156, 30, 153, 28, 180, 100, 22, 1012, 36, 58, 48, 60, 28, 612, 120, 60, 166, 1008, 52, 532, 148, 9840
Offset: 1

Views

Author

Jianing Song, Feb 13 2019

Keywords

Comments

By definition, A001567 lists the odd composite numbers k such that ord(2,k) divides k - 1, where ord(2,k) is the multiplicative order of 2 modulo k. This sequence lists the values for ord(2,k) when k runs through A001567.

Examples

			A001567(1) = 341, 341 divides 2^10 - 1, 341 = 34*10 + 1.
A001567(2) = 561, 561 divides 2^40 - 1, 561 = 14*40 + 1.
A001567(3) = 645, 645 divides 2^28 - 1, 645 = 23*28 + 1.
A001567(4) = 1105, 1105 divides 2^24 - 1, 1105 = 46*24 + 1.
		

Crossrefs

Programs

  • Mathematica
    MultiplicativeOrder[2, #] & /@ Select[Range[1, 10^5, 2], CompositeQ[#] && PowerMod[2, # - 1, #] == 1 &] (* Amiram Eldar, Jun 29 2019 *)
  • PARI
    forstep(n=3, 1e5, 2, my(m=znorder(Mod(2,n))); if((n-1)%m==0 && !isprime(n), print1(m, ", ")))

Formula

a(n) = A002326((A001567(n)-1)/2).
a(n) = (A001567(n) - 1) / A300101(n). - Jianing Song, Dec 12 2021

A327295 Numbers k such that e(k) > 1 and k == e(k) (mod lambda(k)), where e(k) = A051903(k) is the maximal exponent in prime factorization of k.

Original entry on oeis.org

4, 12, 16, 48, 80, 112, 132, 208, 240, 1104, 1456, 1892, 2128, 4144, 5852, 12208, 17292, 18544, 21424, 25456, 30160, 45904, 78736, 97552, 106384, 138864, 153596, 154960, 160528, 289772, 311920, 321904, 399212, 430652, 545584, 750064, 770704, 979916, 1037040, 1058512
Offset: 1

Views

Author

Thomas Ordowski, Dec 05 2019

Keywords

Comments

The condition e(k) > 1 excludes primes and Carmichael numbers.
Numbers n such that e(k) > 1 and b^k == b^e(k) (mod k) for all b.
These are numbers k such that A276976(k) = e(k) > 1.
Are there infinitely many such numbers? Are all such numbers even?
A number k is a term if and only if k is e(k)-Knödel number with e(k) > 1. So they may have the name nonsquarefree e(k)-Knodel numbers k.
It seems that if k is in this sequence, then e(k) = A007814(k) and k/2^e(k) is squarefree.
Conjecture: there are no composite numbers m > 4 such that m == e(m) (mod phi(m)). By Lehmer's totient conjecture, there are no such squarefree numbers.
Problem: are there odd numbers n such that e(n) > 1 and n == e(n) (mod ord_{n}(2)), where ord_{n}(2) = A002326((n-1)/2)? These are odd numbers n such that 2^n == 2^e(n) (mod n) with e(n) > 1.
Numbers k for which A051903(k) > 1 and A219175(k) = A329885(k). - Antti Karttunen, Dec 11 2019

Examples

			The number 4 = 2^2 is a term, because e(4) = A051903(4) = 2 > 1 and 4 == 2 (mod lambda(4)), where lambda(4) = A002322(4) = 2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^5], (e = Max @@ Last /@ FactorInteger[#]) > 1 && Divisible[# -e, CarmichaelLambda[#]] &] (* Amiram Eldar, Dec 05 2019 *)
  • PARI
    isok(n) = ! issquarefree(n) && (Mod(n, lcm(znstar(n)[2])) == vecmax(factor(n)[, 2])); \\ Michel Marcus, Dec 05 2019

Extensions

More terms from Amiram Eldar, Dec 05 2019

A336503 2-practical numbers: numbers m such that the polynomial x^m - 1 has a divisor of every degree <= m in the prime field F_2[x].

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 14, 15, 16, 18, 20, 21, 24, 28, 30, 32, 36, 40, 42, 45, 48, 54, 56, 60, 63, 64, 70, 72, 80, 84, 90, 96, 100, 105, 108, 112, 120, 124, 126, 128, 132, 135, 136, 140, 144, 147, 150, 154, 156, 160, 162, 165, 168, 176, 180, 182, 186, 189, 192
Offset: 1

Views

Author

Amiram Eldar, Jul 23 2020

Keywords

Comments

For a rational prime number p, a "p-practical number" is a number m such that the polynomial x^m - 1 has a divisor of every degree <= m in F_p[x], the prime field of order p.
A number m is 2-practical if and only if every number 1 <= k <= m can be written as Sum_{d|m} A007733(d) * n_d, where A007733(d) is the multiplicative order of 2 modulo the odd part of d, and 0 <= n_d <= phi(d)/A007733(d).
The number of terms not exceeding 10^k for k = 1, 2, ... are 6, 34, 243, 1790, 14703, 120276, 1030279, ...

Crossrefs

Programs

  • Mathematica
    rep[v_, c_] := Flatten @ Table[ConstantArray[v[[i]], {c[[i]]}], {i, Length[c]}]; mo[n_, p_] := MultiplicativeOrder[p, n/p^IntegerExponent[n, p]]; ppQ[n_, p_] := Module[{d = Divisors[n]}, m = mo[#, p] & /@ d; ns = EulerPhi[d]/m; r = rep[m, ns]; Min @ Rest @ CoefficientList[Series[Product[1 + x^r[[i]], {i, Length[r]}], {x, 0, n}], x] >  0]; Select[Range[200], ppQ[#, 2] &]

A036260 Numbers k > 1 such that k mod ord2(k) is even, where ord2(k) is the order of 2 mod k.

Original entry on oeis.org

2921, 3017, 3473, 3479, 5767, 5969, 6167, 6377, 6497, 6913, 7223, 7519, 7567, 7751, 9017, 9271, 10199, 10447, 11431, 11929, 12719, 13439, 13609, 14513, 16583, 17009, 17143, 18631, 18809, 19313, 20737, 21119, 22337, 22351, 22537
Offset: 1

Views

Author

Keywords

Comments

These are all composite since for prime p, ord2(p) | phi(p) = p-1, whence p mod ord2(p) = 1.

Crossrefs

Programs

  • Mathematica
    Select[Range[3, 23000, 2], EvenQ[Mod[#, MultiplicativeOrder[2, #]]] &] (* Amiram Eldar, Jul 30 2020 *)

Extensions

Offset corrected by Amiram Eldar, Jul 30 2020
Previous Showing 91-100 of 198 results. Next