[go: up one dir, main page]

login
Revisions by Jean-François Alcover (See also Jean-François Alcover's wiki page)

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) = F(F(n)) mod n, where F = Fibonacci = A000045.
(history; published version)
#17 by Jean-François Alcover at Tue Oct 29 10:18:00 EDT 2024
STATUS

editing

proposed

#16 by Jean-François Alcover at Tue Oct 29 10:17:54 EDT 2024
MATHEMATICA

F[n_] := MatrixPower[{{0, 1}, {1, 1}}, n][[1, 2]];

p[M_, n_, k_] := Mod[#, k]& /@ If[n == 0, {{1, 0}, {0, 1}}, If[EvenQ[n], MatrixPower[p[M, n/2, k], 2], p[M, n - 1, k].M]];

a[n_] := p[{{0, 1}, {1, 1}}, F[n], n][[1, 2]];

Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Oct 29 2024, after Alois P. Heinz *)

STATUS

approved

editing

a(n) = F(F(n)) mod F(n), where F = Fibonacci = A000045.
(history; published version)
#15 by Jean-François Alcover at Tue Oct 29 10:12:42 EDT 2024
STATUS

editing

proposed

#14 by Jean-François Alcover at Tue Oct 29 10:12:29 EDT 2024
MATHEMATICA

F[n_] := MatrixPower[{{0, 1}, {1, 1}}, n][[1, 2]];

p[M_, n_, k_] := Mod[#, k]& /@ If[n == 0, {{1, 0}, {0, 1}}, If[EvenQ[n], MatrixPower[p[M, n/2, k], 2], p[M, n - 1, k].M]];

a[n_] := p[{{0, 1}, {1, 1}}, F[n], F[n]][[1, 2]];

Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Oct 29 2024, after Alois P. Heinz *)

STATUS

approved

editing

a(n) = smallest number which can be expressed as the sum of n of its distinct divisors, or 0 if no such number exists.
(history; published version)
#44 by Jean-François Alcover at Mon Oct 21 09:57:59 EDT 2024
STATUS

editing

proposed

#43 by Jean-François Alcover at Mon Oct 21 09:57:35 EDT 2024
MATHEMATICA

(* This partly empirical program is just a recomputation of existing data. *)

f[n_, k_] := Module[{c, cc, dd}, dd = Most@ Divisors@k; cc = c[#]& /@ Range@ Length@dd; FindInstance[AllTrue[cc, 0 <= # <= 1&] && cc.dd == k && Total[cc] == n, cc, Integers, 1]];

a[n_] := a[n] = Switch[n, 1, 1, 2, 0, 3, 6, _, For[k = a[n - 1], True, k = k + If[n < 25, 1, 60], If[f[n, k] != {}, Return[k]]]];

Table[Print[n, " ", a[n]]; a[n], {n, 1, 49}] (* Jean-François Alcover, Oct 21 2024 *)

STATUS

approved

editing

Number of composites <= n^2.
(history; published version)
#9 by Jean-François Alcover at Mon Oct 21 04:39:40 EDT 2024
STATUS

editing

proposed

#8 by Jean-François Alcover at Sun Oct 20 09:52:36 EDT 2024
MATHEMATICA

a[n_] := n^2 - PrimePi[n^2];

Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 20 2024, after R. J. Mathar *)

STATUS

approved

editing

a(1) = 1; for n > 1, a(n) = curling number of (b(1),...,b(n-1)), where b() = Thue-Morse sequence A010060 (with offset changed to 1).
(history; published version)
#20 by Jean-François Alcover at Fri Oct 18 11:14:53 EDT 2024
STATUS

editing

proposed

#19 by Jean-François Alcover at Fri Oct 18 11:14:30 EDT 2024
MATHEMATICA

(* Function curlN is defined in A094840 *)

(* Function ThueMorse needs Mma version >= 11 *)

a[n_] := If[n == 1, 1, curlN[Array[ThueMorse, n-1, 0]]];

Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 18 2024 *)

CROSSREFS
STATUS

approved

editing